aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/update_to_RC3.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-02-12 13:51:09 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-02-12 13:51:09 +0000
commit13dc264b34e48c29257e8e4407fa34c6d9e9b5c5 (patch)
treebd76713e0178956313622ce4f1ed141784840343 /phpBB/update_to_RC3.php
parenta6289ca6e55a96e37b73de8e2bbaf775c032f746 (diff)
downloadforums-13dc264b34e48c29257e8e4407fa34c6d9e9b5c5.tar
forums-13dc264b34e48c29257e8e4407fa34c6d9e9b5c5.tar.gz
forums-13dc264b34e48c29257e8e4407fa34c6d9e9b5c5.tar.bz2
forums-13dc264b34e48c29257e8e4407fa34c6d9e9b5c5.tar.xz
forums-13dc264b34e48c29257e8e4407fa34c6d9e9b5c5.zip
Added most users + moderator user_level updates
git-svn-id: file:///svn/phpbb/trunk@2103 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/update_to_RC3.php')
-rw-r--r--phpBB/update_to_RC3.php49
1 files changed, 48 insertions, 1 deletions
diff --git a/phpBB/update_to_RC3.php b/phpBB/update_to_RC3.php
index 8539da1a09..73fbfd87b1 100644
--- a/phpBB/update_to_RC3.php
+++ b/phpBB/update_to_RC3.php
@@ -196,6 +196,8 @@ if( $row = $db->sql_fetchrow($result) )
}
}
+print "<br />Updating topic first post info<br />";
+
$sql = "SELECT MIN(post_id) AS first_post_id, topic_id
FROM " . POSTS_TABLE . "
GROUP BY topic_id
@@ -223,6 +225,37 @@ if ( $row = $db->sql_fetchrow($result) )
while ( $row = $db->sql_fetchrow($result) );
}
+print "<br />Updating moderator user_level<br />";
+$sql = "SELECT DISTINCT u.user_id
+ FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
+ WHERE aa.auth_mod = 1
+ AND ug.group_id = aa.group_id
+ AND u.user_id = ug.user_id
+ AND u.user_level <> 1";
+if ( !$db->sql_query($sql) )
+{
+ die("Couldn't obtain moderator user ids");
+}
+
+if ( $row = $db->sql_fetchrow($result) )
+{
+ do
+ {
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_level = " . MOD . "
+ WHERE user_id = " . $row['user_id'];
+ if ( !$db->sql_query($sql) )
+ {
+ die("Couldn't update user level");
+ }
+ }
+ while ( $row = $db->sql_fetchrow($result) );
+
+}
+
+
+print "<br />Updating config settings<br />";
+
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value )
VALUES ('version', 'RC-3')";
if ( !$db->sql_query($sql) )
@@ -230,7 +263,21 @@ if ( !$db->sql_query($sql) )
die("Couldn't insert new config var");
}
-echo "\n<br /><br />\n<b>COMPLETE! Please delete this file before continuing!</b><br />\n";
+$sql = "INSERT INTO " . CONFIG_TABLE . "
+ (config_name, config_value) VALUES ('record_online_users', '1')";
+if( !$db->sql_query($sql) )
+{
+ die("Couldn't insert config key 'record_online_users'");
+}
+
+$sql = "INSERT INTO " . CONFIG_TABLE . "
+ (config_name, config_value) VALUES ('record_online_date', '" . time() . "')";
+if( !$db->sql_query($sql) )
+{
+ die("Couldn't insert config key 'record_online_date'");
+}
+
+echo "\n<br />\n<b>COMPLETE! Please delete this file before continuing!</b><br />\n";
?>
</body>