|
From: Benjamin C. <bc...@us...> - 2004-05-21 12:26:18
|
Update of /cvsroot/phpbt/phpbt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6092 Modified Files: Tag: htmltemplates include.php Log Message: Fixes bug #956443 - Database query conflicts with upgrade.php Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.126.4.4 retrieving revision 1.126.4.5 diff -u -r1.126.4.4 -r1.126.4.5 --- include.php 3 May 2004 13:34:38 -0000 1.126.4.4 +++ include.php 21 May 2004 12:25:57 -0000 1.126.4.5 @@ -56,14 +56,15 @@ $db->setFetchMode(DB_FETCHMODE_ASSOC); $db->setErrorHandling(PEAR_ERROR_CALLBACK, "handle_db_error"); -// Set up the configuration variables -$rs = $db->query('select varname, varvalue from '.TBL_CONFIGURATION); -while (list($k, $v) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) { - define($k, $v); +if (empty($upgrading)) { + // Set up the configuration variables + $rs = $db->query('select varname, varvalue from '.TBL_CONFIGURATION); + while (list($k, $v) = $rs->fetchRow(DB_FETCHMODE_ORDERED)) { + define($k, $v); + } + define('OPEN_BUG_STATUSES', join(', ', + $db->getCol("select status_id from status where bug_open = 1"))); } -define('OPEN_BUG_STATUSES', join(', ', - $db->getCol("select status_id from status where bug_open = 1"))); - require_once ('inc/db/'.DB_TYPE.'.php'); $me = $HTTP_SERVER_VARS['PHP_SELF']; |