diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2007-02-22 16:20:11 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-02-22 16:20:11 +0000 |
| commit | 97a8eb40139ddb299754a883508c9250ef544f36 (patch) | |
| tree | 43ca2cbc3ebccdc2f8043e0c7f81acbd219efa13 /phpBB/install/convertors/functions_phpbb20.php | |
| parent | 87c3b60b179132e8e2d7b0b794b81f566d0558ad (diff) | |
| download | forums-97a8eb40139ddb299754a883508c9250ef544f36.tar forums-97a8eb40139ddb299754a883508c9250ef544f36.tar.gz forums-97a8eb40139ddb299754a883508c9250ef544f36.tar.bz2 forums-97a8eb40139ddb299754a883508c9250ef544f36.tar.xz forums-97a8eb40139ddb299754a883508c9250ef544f36.zip | |
trying to fix two conversion issues
- anonymous user not entered correctly or entered with user id 0 (need to be tested)
- ips not converted
git-svn-id: file:///svn/phpbb/trunk@7034 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/convertors/functions_phpbb20.php')
| -rw-r--r-- | phpBB/install/convertors/functions_phpbb20.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php index 8f6328a928..2c53e5ccd1 100644 --- a/phpBB/install/convertors/functions_phpbb20.php +++ b/phpBB/install/convertors/functions_phpbb20.php @@ -436,16 +436,6 @@ function phpbb_get_birthday($birthday = '') */ function phpbb_user_id($user_id) { - if (!$user_id) - { - return 0; - } - - if ($user_id == -1) - { - return ANONYMOUS; - } - global $config; // Increment user id if the old forum is having a user with the id 1 @@ -484,6 +474,19 @@ function phpbb_user_id($user_id) } } + // If the old user id is -1 in 2.0.x it is the anonymous user... + if ($user_id == -1) + { + return ANONYMOUS; + } + + // This should never ever happen - 2.0.x is not allowing a user id of 0 + // But we return the anonymous user to be consistent and not breaking functionality + if (!$user_id) + { + return ANONYMOUS; + } + if (!empty($config['increment_user_id'])) { $user_id++; @@ -1125,6 +1128,7 @@ function phpbb_prepare_message($message) $message = preg_replace('/\[quote="(.*?)"\]/s', '[quote="\1"]', $message); } + // Already the new user id ;) $user_id = $convert->row['poster_id']; $message = str_replace('<', '<', $message); |
