aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-02-18 01:40:51 +0000
committerAndreas Fischer <bantu@phpbb.com>2010-02-18 01:40:51 +0000
commitdccd529498a879d4620e5878acd0435274f3182b (patch)
tree14bbfc40a90f468df039e2f62144075f49fafc17 /phpBB/install/database_update.php
parentb68d23347a03ff0f7b3fe9dbdddd93675f812776 (diff)
downloadforums-dccd529498a879d4620e5878acd0435274f3182b.tar
forums-dccd529498a879d4620e5878acd0435274f3182b.tar.gz
forums-dccd529498a879d4620e5878acd0435274f3182b.tar.bz2
forums-dccd529498a879d4620e5878acd0435274f3182b.tar.xz
forums-dccd529498a879d4620e5878acd0435274f3182b.zip
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
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php35
1 files changed, 35 insertions, 0 deletions
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;
}
}