SMF Converter - phpBB3 - Board import should use stripslashes()

Started by syncopix, April 06, 2011, 04:27:23 PM

Previous topic - Next topic

syncopix

Hi,

I was importing from a phpBB3 install to SMF 2.0 RC5 earlier and noted that imported board names and descriptions had escape slashes in them.

Here is a diff against the current Phpbb 3 to SMF 2-0-rc4 Converter that corrects this issue:


--- phpbb3_to_smf.sql   2010-10-24 15:07:33.000000000 +0100
+++ ../forum/phpbb3_to_smf.sql  2011-04-06 21:07:17.000000000 +0100
@@ -396,9 +396,12 @@

---* {$to_prefix}boards
---{
+$ignore_slashes = true;
if (empty($row['id_cat']))
        $row['id_cat'] = 1;
$row['name'] = str_replace('\n', '<br />', $row['name']);
+$row['name'] = stripslashes($row['name']);
+$row['description'] = stripslashes($row['description']);
---}
SELECT
        f.forum_id AS id_board, CASE WHEN f.parent_id = c.temp_id THEN 0 ELSE f.parent_id END AS id_parent, f.left_id AS board_order, f.forum_posts AS num_posts,
@@ -711,4 +714,4 @@
        post_msg_id AS id_msg, download_count AS downloads,
        real_filename AS filename, physical_filename, filesize AS size
FROM {$from_prefix}attachments;
----*
\ No newline at end of file
+---*

Joshua Dickerson

I really, really hate working with converters because it means that I have to install more software. Can someone else confirm this is a bug and test the fix?
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Trekkie101

It's a bug, we should probably strip a lot more fields on pretty much everything unless we're casting the variables to a set type. Can't ever trust those rogue dev's :P

Advertisement: