diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-02-03 12:48:36 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-02-03 12:48:36 +0000 |
commit | ba639e20eb85a5bbe1c84e2308a166eae10b2e0a (patch) | |
tree | 537209222e47f2fce6026684bb591c1e2542b79a | |
parent | fb8dc345ddfcbcd6e6192c7361cb8f75a08940e6 (diff) | |
download | forums-ba639e20eb85a5bbe1c84e2308a166eae10b2e0a.tar forums-ba639e20eb85a5bbe1c84e2308a166eae10b2e0a.tar.gz forums-ba639e20eb85a5bbe1c84e2308a166eae10b2e0a.tar.bz2 forums-ba639e20eb85a5bbe1c84e2308a166eae10b2e0a.tar.xz forums-ba639e20eb85a5bbe1c84e2308a166eae10b2e0a.zip |
make sure the session table is empty after conversion and the current session being killed. This makes sure the user converting does not inherit wrong user settings becuase the 3.0.x users table being completely new.
git-svn-id: file:///svn/phpbb/trunk@6964 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/install/install_convert.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/phpBB/install/install_convert.php b/phpBB/install/install_convert.php index c8f50a6f21..9a5177c941 100644 --- a/phpBB/install/install_convert.php +++ b/phpBB/install/install_convert.php @@ -191,7 +191,28 @@ class install_convert extends module 'TITLE' => $lang['CONVERT_COMPLETE'], 'BODY' => $lang['CONVERT_COMPLETE_EXPLAIN'], )); - + + // If we reached this step (conversion completed) we want to purge the cache and log the user out. + // This is for making sure the session get not screwed due to the 3.0.x users table being completely new. + $cache->purge(); + + // Make sure this session gets killed + $user->session_kill(); + + switch ($db->sql_layer) + { + case 'sqlite': + case 'firebird': + $db->sql_query('DELETE FROM ' . SESSIONS_KEYS_TABLE); + $db->sql_query('DELETE FROM ' . SESSIONS_TABLE); + break; + + default: + $db->sql_query('TRUNCATE TABLE ' . SESSIONS_KEYS_TABLE); + $db->sql_query('TRUNCATE TABLE ' . SESSIONS_TABLE); + break; + } + break; } } |