aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/database_update.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-09-02 06:34:27 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-09-02 06:34:27 +0000
commit7f813a9ef65fbf3dd24565e3e199ab67b38df70c (patch)
treedf11c3a07ac8c3e22adb6e0cd9610744915d13d6 /phpBB/install/database_update.php
parentfcd0eae9ddee220fa6e5d82278024d062ede88dd (diff)
downloadforums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar.gz
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar.bz2
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar.xz
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.zip
settings and data for the new queued posts feature ;)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8804 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/database_update.php')
-rw-r--r--phpBB/install/database_update.php24
1 files changed, 23 insertions, 1 deletions
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index af631d09fc..88ad142013 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -532,7 +532,7 @@ $database_update_info = array(
// No changes from 3.0.2-RC2 to 3.0.2
'3.0.2-RC2' => array(),
- // Changes from 3.0.2 to the next version
+ // Changes from 3.0.2 to 3.0.3-RC1
'3.0.2' => array(
// Add the following columns
'add_columns' => array(
@@ -1831,6 +1831,28 @@ function change_database_data(&$no_updates, $version)
// No changes from 3.0.2-RC2 to 3.0.2
case '3.0.2-RC2':
break;
+
+ // Changes from 3.0.2 to 3.0.3-RC1
+ case '3.0.3':
+ set_config('enable_queue_trigger', '0');
+ set_config('queue_trigger_posts', '3');
+
+ // Resync post counts
+ $sql = 'SELECT COUNT(p.post_id) AS num_posts, u.user_id
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . POSTS_TABLE . ' p ON (u.user_id = p.poster_id AND p.post_postcount = 1 AND p.post_approved = 1)
+ GROUP BY u.user_id';
+ $result = _sql($sql, $errored, $error_ary);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['user_id']}";
+ _sql($sql, $errored, $error_ary);
+ }
+ $db->sql_freeresult($result);
+
+ $no_updates = false;
+ break;
}
}