|
From: Paul S. O. <ps...@us...> - 2002-02-14 22:42:52
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv20650
Modified Files:
update_to_RC3.php
Log Message:
Change die's in final inserts to prints + other minor changes
Index: update_to_RC3.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/update_to_RC3.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** update_to_RC3.php 14 Feb 2002 10:26:14 -0000 1.13
--- update_to_RC3.php 14 Feb 2002 22:42:49 -0000 1.14
***************
*** 151,154 ****
--- 151,155 ----
{
echo "Running :: " . $sql[$i];
+ flush();
if ( !($result = $db->sql_query($sql[$i])) )
***************
*** 167,170 ****
--- 168,172 ----
{
echo "\n<br /><b>Some queries failed! This is probably nothing to worry about, update will attempt to continue. Should this fail you may need to seek help at our development board (see README)</b><br /><br />\n\n";
+ flush();
}
***************
*** 197,201 ****
}
! print "<br />Updating topic first post info<br />";
$sql = "SELECT MIN(post_id) AS first_post_id, topic_id
--- 199,204 ----
}
! print "<br />Updating topic first post info<br />\n";
! flush();
$sql = "SELECT MIN(post_id) AS first_post_id, topic_id
***************
*** 226,230 ****
}
! 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
--- 229,235 ----
}
! print "<br />Updating moderator user_level<br />\n";
! flush();
!
$sql = "SELECT DISTINCT u.user_id
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
***************
*** 238,259 ****
}
! 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 . "
--- 243,265 ----
}
! $mod_user = array();
! while ( $row = $db->sql_fetchrow($result) )
{
! $mod_user[] = $row['user_id'];
! }
!
! if ( count($mod_user) )
! {
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_level = " . MOD . "
! WHERE user_id IN (" . implode(", ", $mod_user) . ")";
! if ( !$db->sql_query($sql) )
{
! die("Couldn't update user level");
}
}
! print "<br />Updating config settings<br />\n";
! flush();
$sql = "INSERT INTO " . CONFIG_TABLE . "
***************
*** 261,265 ****
if( !$db->sql_query($sql) )
{
! die("Couldn't insert config key 'server_name'");
}
--- 267,271 ----
if( !$db->sql_query($sql) )
{
! print "Failed inserting server_name config ... probably exists already<br />\n";
}
***************
*** 268,272 ****
if( !$db->sql_query($sql) )
{
! die("Couldn't insert config key 'script_path'");
}
--- 274,278 ----
if( !$db->sql_query($sql) )
{
! print "Failed inserting script_path config ... probably exists already<br />\n";
}
***************
*** 275,279 ****
if( !$db->sql_query($sql) )
{
! die("Couldn't insert config key 'server_port'");
}
--- 281,285 ----
if( !$db->sql_query($sql) )
{
! print "Failed inserting server_port config ... probably exists already<br />\n";
}
***************
*** 282,286 ****
if ( !$db->sql_query($sql) )
{
! die("Couldn't insert config key 'version'");
}
--- 288,292 ----
if ( !$db->sql_query($sql) )
{
! print "Failed inserting version config ... probably exists already<br />\n";
}
***************
*** 289,293 ****
if( !$db->sql_query($sql) )
{
! die("Couldn't insert config key 'record_online_users'");
}
--- 295,299 ----
if( !$db->sql_query($sql) )
{
! print "Failed inserting record_online_users config ... probably exists already<br />\n";
}
***************
*** 296,300 ****
if( !$db->sql_query($sql) )
{
! die("Couldn't insert config key 'record_online_date'");
}
--- 302,306 ----
if( !$db->sql_query($sql) )
{
! print "Failed inserting record_online_date config ... probably exists already<br />\n";
}
|