From 3d02c2a8044199f62c06dbae827dd4447ce739c3 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 10 Mar 2007 11:17:02 +0000 Subject: [PATCH] convert sizes (UNTESTED at the moment!) git-svn-id: file:///svn/phpbb/trunk@7160 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/convertors/functions_phpbb20.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index c1bb476b60..25887b2f8e 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -1156,6 +1156,15 @@ function phpbb_prepare_message($message) $message = preg_replace('/\[quote="(.*?)"\]/s', '[quote="\1"]', $message); } + // Adjust size... + if (strpos($message, '[size=') !== false) + { + // Doing it with a map. + $match_size = array('/\[size=[0-7]\]/', '/\[size=[8-9]\]/', '/\[size=[10-12]\]/', '/\[size=[13-18]\]/', '/\[size=[19-99]\]/'); + $replace_size = array('[size=50]', '[size=85]', '[size=100]', '[size=150]', '[size=200]'); + $message = preg_replace($match_size, $replace_size, $message); + } + // Already the new user id ;) $user_id = $convert->row['poster_id'];