|
From: Ken T. <ke...@us...> - 2003-07-26 01:39:23
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv21031
Modified Files:
config-dist.php config.php upgrade.php
Log Message:
changed DB_VERSION to CUR_DB_VERSION to avoid naming conflicts
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- config-dist.php 24 Jul 2003 04:47:13 -0000 1.26
+++ config-dist.php 25 Jul 2003 19:22:26 -0000 1.27
@@ -34,7 +34,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 4); // the version of the database
+define ('CUR_DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', '{tbl_prefix}'); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- config.php 24 Jul 2003 04:47:13 -0000 1.38
+++ config.php 25 Jul 2003 19:22:26 -0000 1.39
@@ -37,7 +37,7 @@
// Database Table Config
// you can change either the prefix of the table names or each table name individually
-define ('DB_VERSION', 4); // the version of the database
+define ('CUR_DB_VERSION', 4); // the version of the database
define ('TBL_PREFIX', ''); // the prefix for all tables, leave empty to use the old style
define ('TBL_ACTIVE_SESSIONS', TBL_PREFIX.'active_sessions');
define ('TBL_DB_SEQUENCE', TBL_PREFIX.'db_sequence');
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- upgrade.php 24 Jul 2003 04:47:13 -0000 1.35
+++ upgrade.php 25 Jul 2003 19:22:26 -0000 1.36
@@ -30,7 +30,7 @@
global $db;
$thisvers = $db->getOne('select varvalue from '.TBL_CONFIGURATION.' where varname = \'DB_VERSION\'');
- if ($thisvers == DB_VERSION) $upgraded = 1;
+ if ($thisvers == CUR_DB_VERSION) $upgraded = 1;
if (!$upgraded or DB::isError($thisvers)) {
if (!@is_writeable('c_templates')) {
include('templates/default/base/templatesperm.html');
@@ -68,7 +68,7 @@
$db->query("UPDATE ".TBL_AUTH_GROUP." SET assignable = 1 WHERE group_id = 3");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('EMAIL_DISABLED', '0', 'Whether to disable all mail sent from the system', 'bool');");
/* add db-version attribute */
- $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('DB_VERSION', '".DB_VERSION."', 'Database Version <b>Warning:</b> Changing this might make things go horribly wrong.', 'string')");
+ $db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('DB_VERSION', '".CUR_DB_VERSION."', 'Database Version <b>Warning:</b> Changing this might make things go horribly wrong.', 'string')");
}
if ($thisvers < 4) {
@@ -77,7 +77,7 @@
}
/* update to current DB_VERSION */
- $db->query("UPDATE ".TBL_CONFIGURATION." SET varvalue = '".DB_VERSION."' WHERE varname = 'DB_VERSION'");
+ $db->query("UPDATE ".TBL_CONFIGURATION." SET varvalue = '".CUR_DB_VERSION."' WHERE varname = 'DB_VERSION'");
}
include 'templates/default/upgrade-finished.html';
|