From dccd529498a879d4620e5878acd0435274f3182b Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 18 Feb 2010 01:40:51 +0000 Subject: Merge r10497 and r10499 into 3.0.7 - #57755 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_7@10502 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 1d58276b10..748d2d9b10 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -906,6 +906,9 @@ function database_update_info() ), ), ), + + // No changes from 3.0.7-RC1 to 3.0.7 + '3.0.7-RC1' => array(), ); } @@ -1597,6 +1600,38 @@ function change_database_data(&$no_updates, $version) $no_updates = false; break; + + // No changes from 3.0.7-RC1 to 3.0.7 + case '3.0.7-RC1': + + $sql = 'SELECT user_id, user_email, user_email_hash + FROM ' . USERS_TABLE . ' + WHERE user_type <> ' . USER_IGNORE . " + AND user_email <> ''"; + $result = $db->sql_query($sql); + + $i = 0; + while ($row = $db->sql_fetchrow($result)) + { + $user_email_hash = phpbb_email_hash($row['user_email']); + + if ($user_email_hash != $row['user_email_hash']) + { + $sql_ary = array( + 'user_email_hash' => $user_email_hash, + ); + + $sql = 'UPDATE ' . USERS_TABLE . ' + SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE user_id = ' . (int) $row['user_id']; + __sql($sql, $errored, $error_ary, ($i % 100 == 0)); + + ++$i; + } + } + $db->sql_freeresult($result); + + break; } } -- cgit v1.2.1 From 19da9ac065d97907ef67e49f5edc7bbe68d4b79d Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 18 Feb 2010 02:13:15 +0000 Subject: Merge r10503, r10504 into 3.0.7 branch. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_7@10505 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 748d2d9b10..fd7ada6b80 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -907,8 +907,10 @@ function database_update_info() ), ), - // No changes from 3.0.7-RC1 to 3.0.7 + // No changes from 3.0.7-RC1 to 3.0.7-RC2 '3.0.7-RC1' => array(), + // No changes from 3.0.7-RC2 to 3.0.7 + '3.0.7-RC2' => array(), ); } @@ -1601,7 +1603,7 @@ function change_database_data(&$no_updates, $version) $no_updates = false; break; - // No changes from 3.0.7-RC1 to 3.0.7 + // Changes from 3.0.7-RC1 to 3.0.7-RC2 case '3.0.7-RC1': $sql = 'SELECT user_id, user_email, user_email_hash @@ -1624,13 +1626,19 @@ function change_database_data(&$no_updates, $version) $sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . (int) $row['user_id']; - __sql($sql, $errored, $error_ary, ($i % 100 == 0)); + _sql($sql, $errored, $error_ary, ($i % 100 == 0)); ++$i; } } $db->sql_freeresult($result); + $no_updates = false; + + break; + + // No changes from 3.0.7-RC2 to 3.0.7 + case '3.0.7-RC2': break; } } -- cgit v1.2.1 From 5ae48dd87313398e9567ea97ea24eaf716b8d15c Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 18 Feb 2010 02:14:02 +0000 Subject: Bump version to 3.0.7-RC2. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_7@10506 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index fd7ada6b80..f5ff282279 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.7-RC1'; +$updates_to_version = '3.0.7-RC2'; // Enter any version to update from to test updates. The version within the db will not be updated. $debug_from_version = false; -- cgit v1.2.1 From 4f439593ced5a6433d844f6cb8b22df13b8401b5 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Mon, 22 Feb 2010 19:37:09 +0000 Subject: Merge r10520 into 3.0.7 branch. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_7@10521 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/install/database_update.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB/install/database_update.php') diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index f5ff282279..9bb09747da 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -1615,7 +1615,9 @@ function change_database_data(&$no_updates, $version) $i = 0; while ($row = $db->sql_fetchrow($result)) { - $user_email_hash = phpbb_email_hash($row['user_email']); + // Snapshot of the phpbb_email_hash() function + // We cannot call it directly because the auto updater updates the DB first. :/ + $user_email_hash = sprintf('%u', crc32(strtolower($row['user_email']))) . strlen($row['user_email']); if ($user_email_hash != $row['user_email_hash']) { -- cgit v1.2.1