[phpMP-CVS] CVS: phpMP/includes core.php,1.30,1.31
Status: Pre-Alpha
Brought to you by:
heimidal
From: Brian R. <hei...@us...> - 2002-12-01 21:49:14
|
Update of /cvsroot/phpmp/phpMP/includes In directory sc8-pr-cvs1:/tmp/cvs-serv9993/includes Modified Files: core.php Log Message: Redestributed $DB to its own variable and not within the scope of $Core. Index: core.php =================================================================== RCS file: /cvsroot/phpmp/phpMP/includes/core.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -r1.30 -r1.31 *** core.php 1 Dec 2002 03:47:22 -0000 1.30 --- core.php 1 Dec 2002 21:49:11 -0000 1.31 *************** *** 4,9 **** { - var $DB; - // Initiates configuration from database. // Author: Brian 'Heimidal' Rose --- 4,7 ---- *************** *** 19,27 **** define("BLOCK_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'blocks'); ! $result = $this->DB->query( "SELECT * FROM " . CONFIG_TABLE ); // Loop through all config values from DB. // Define each key as its respective value. ! while( $row = $this->DB->fetchArray( $result ) ) { define( strtoupper( $row['key'] ), $row['value'] ); --- 17,27 ---- define("BLOCK_TABLE", DB_NAME . '.' . DB_TABLE_PREFIX . 'blocks'); ! global $DB; ! ! $result = $DB->query( "SELECT * FROM " . CONFIG_TABLE ); // Loop through all config values from DB. // Define each key as its respective value. ! while( $row = $DB->fetchArray( $result ) ) { define( strtoupper( $row['key'] ), $row['value'] ); *************** *** 43,49 **** //$Debug = new Debug(); include( './dba/' . DB_TYPE . '.dba' ); ! $this->DB = new DB(); ! $this->DB->connect(); $this->_initConfig(); // Grab DB-stored config values. --- 43,51 ---- //$Debug = new Debug(); + global $DB; + include( './dba/' . DB_TYPE . '.dba' ); ! $DB = new DB(); ! $DB->connect(); $this->_initConfig(); // Grab DB-stored config values. |