diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-04 21:44:36 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-04-04 21:44:36 +0000 |
| commit | 214f16f79105cc6f6eed644a64782093cc3cbfe2 (patch) | |
| tree | 75bddefbd91dba7445daae786e301c2c6d1d1ef1 | |
| parent | a676b8fdf87c083c2a4a00f135d115a43eb560d7 (diff) | |
| download | forums-214f16f79105cc6f6eed644a64782093cc3cbfe2.tar forums-214f16f79105cc6f6eed644a64782093cc3cbfe2.tar.gz forums-214f16f79105cc6f6eed644a64782093cc3cbfe2.tar.bz2 forums-214f16f79105cc6f6eed644a64782093cc3cbfe2.tar.xz forums-214f16f79105cc6f6eed644a64782093cc3cbfe2.zip | |
Update a few things for 2.1 CVS
git-svn-id: file:///svn/phpbb/trunk@2487 89ea8834-ac86-4346-8a33-228a782c2dd0
| -rw-r--r-- | phpBB/update_script.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/phpBB/update_script.php b/phpBB/update_script.php new file mode 100644 index 0000000000..9ed7f48a35 --- /dev/null +++ b/phpBB/update_script.php @@ -0,0 +1,42 @@ +<html> +<body> +<?php + +define('IN_PHPBB', 1); +$phpbb_root_path = './'; +include($phpbb_root_path . 'extension.inc'); +include($phpbb_root_path . 'config.'.$phpEx); +include($phpbb_root_path . 'includes/constants.'.$phpEx); +include($phpbb_root_path . 'includes/functions.'.$phpEx); +include($phpbb_root_path . 'includes/db.'.$phpEx); + +$sql = "SELECT config_value + FROM " . CONFIG_TABLE . " + WHERE config_name = 'version'"; +if ( !($result = $db->sql_query($sql)) ) +{ + die("Couldn't obtain version info"); +} + +if ( $row = $db->sql_fetchrow($result) ) +{ + if ( $row['config_value'] != '.1.0 [20020402]' ) + { + $sql = "UPDATE " . CONFIG_TABLE . " + SET config_value = '.1.0 [20020402]' + WHERE config_name = 'version'"; + if ( !($result = $db->sql_query($sql)) ) + { + die("Couldn't update version info"); + } + + die("UPDATING COMPLETE"); + } +} + + +echo "\n<br />\n<b>COMPLETE!</b><br />\n"; +echo "\n<p>Don't forget to delete this file!</p>\n"; +?> +</body> +</html> |
