diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-20 00:22:29 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-20 00:22:29 +0000 |
commit | 5b0bba72b1c619af2f39859ec0c262f860f991ac (patch) | |
tree | 9fb003cf223ff6bf2e26feb78a35603dff88a471 /phpBB/update_script.php | |
parent | 65aa92182826eb06830626df49ab7a0210b06718 (diff) | |
download | forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.gz forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.bz2 forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.tar.xz forums-5b0bba72b1c619af2f39859ec0c262f860f991ac.zip |
merged from 2.0.0 branch (marked merge_point_20020420) + assorted updates and trial stuff for example session alterations
git-svn-id: file:///svn/phpbb/trunk@2532 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/update_script.php')
-rw-r--r-- | phpBB/update_script.php | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/phpBB/update_script.php b/phpBB/update_script.php index 9ed7f48a35..92d6f3ac37 100644 --- a/phpBB/update_script.php +++ b/phpBB/update_script.php @@ -20,20 +20,43 @@ if ( !($result = $db->sql_query($sql)) ) if ( $row = $db->sql_fetchrow($result) ) { - if ( $row['config_value'] != '.1.0 [20020402]' ) + $sql = array(); + switch ( $row['config_value'] ) { - $sql = "UPDATE " . CONFIG_TABLE . " - SET config_value = '.1.0 [20020402]' - WHERE config_name = 'version'"; - if ( !($result = $db->sql_query($sql)) ) + case '.1.0 [20020402]': + echo 'Updating from [20020402] :: '; + flush(); + + $sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) + VALUES ('session_gc', '3600')"; + $sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) + VALUES ('session_last_gc', '0')"; + + echo '<span style="color:green">DONE</span><br /><br />'; + break; + default; + echo 'No updates made<br /><br />'; + } + + if ( count($sql) ) + { + for($i = 0; $i < count($sql); $i++) { - die("Couldn't update version info"); + if ( !($result = $db->sql_query($sql[$i])) ) + { + die("Couldn't run update >> " . $sql); + } } - - die("UPDATING COMPLETE"); } } +$sql = "UPDATE " . CONFIG_TABLE . " + SET config_value = '.1.0 [20020420]' + WHERE config_name = 'version'"; +if ( !($result = $db->sql_query($sql)) ) +{ + die("Couldn't update version info"); +} echo "\n<br />\n<b>COMPLETE!</b><br />\n"; echo "\n<p>Don't forget to delete this file!</p>\n"; |