Changeset 7087
- Timestamp:
- 11/26/08 02:30:30 (6 weeks ago)
- Location:
- trunk/library
- Files:
-
- 4 modified
-
components/Needlworks.DBMS.MySQLi.php (modified) (2 diffs)
-
components/Needlworks.PHP.Core.php (modified) (1 diff)
-
components/Textcube.Data.Config.php (modified) (1 diff)
-
preprocessor.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/library/components/Needlworks.DBMS.MySQLi.php
r6534 r7087 14 14 // Connects DB and set environment variables 15 15 // $database array should contain 'server','username','password'. 16 self::$cachedResult = self::$dbProperties = array(); 16 17 if(!isset($database) || empty($database)) return false; 17 18 if(!isset($database['port']) && strpos($database['server'],':')) { … … 33 34 self::$dbProperties['charset'] = 'default'; 34 35 @self::query('SET SESSION collation_connection = \'utf8_general_ci\''); 35 self::$cachedResult = self::$dbProperties = array();36 36 return true; 37 37 } -
trunk/library/components/Needlworks.PHP.Core.php
r6533 r7087 254 254 **/ 255 255 256 256 private static $queue; 257 258 static function addRule($iv) { 259 if(empty(self::$queue)) self::$queue = array('GET'=>array(),'POST'=>array(),'REQUEST'=>array(),'SERVER'=>array(),'FILES'=>array()); 260 if(isset($iv['GET'])) self::$queue['GET'] = array_merge(self::$queue['GET'],$iv['GET']); 261 if(isset($iv['POST'])) self::$queue['POST'] = array_merge(self::$queue['POST'],$iv['POST']); 262 if(isset($iv['REQUEST'])) self::$queue['REQUEST'] = array_merge(self::$queue['REQUEST'],$iv['REQUEST']); 263 if(isset($iv['SERVER'])) self::$queue['SERVER'] = array_merge(self::$queue['SERVER'],$iv['SERVER']); 264 if(isset($iv['FILES'])) self::$queue['FILES'] = array_merge(self::$queue['FILES'],$iv['FILES']); 265 } 266 static function isValid() { 267 return self::validate(self::$queue); 268 } 269 257 270 static function validate(&$iv) { 258 271 if (isset($iv['GET'])) { -
trunk/library/components/Textcube.Data.Config.php
r7075 r7087 40 40 41 41 // Database setting. 42 // if(isset($service['dbms'])) { 43 // if($service['dbms'] == 'mysql' && class_exists('mysqli')) $service['dbms'] = 'mysqli'; 44 // } 45 46 // Debug mode configuration. 47 if($service['debugmode'] == true) { 48 if(isset($service['dbms'])) { 49 switch($service['dbms']) { 50 case 'mysqli': require_once(ROOT. "/library/components/Needlworks.Debug.MySQLi.php"); break; 51 case 'mysql': default: require_once(ROOT. "/library/components/Needlworks.Debug.MySQL.php"); break; 52 } 53 } else require_once(ROOT. "/library/components/Needlworks.Debug.MySQL.php"); 42 if(isset($service['dbms'])) { 43 if($service['dbms'] == 'mysql' && class_exists('mysqli')) $service['dbms'] = 'mysqli'; 54 44 } 55 45 -
trunk/library/preprocessor.php
r7072 r7087 4 4 /// See the GNU General Public License for more details. (/doc/LICENSE, /doc/COPYRIGHT) 5 5 6 /** Dispatcher6 /** Pre-processor - This file 7 7 ---------- 8 8 9 */ 9 10 /** Loading Basic Components */ … … 27 28 ); 28 29 Validator::validateArray($_SERVER, $basicIV); 30 /** Basic URI information validation. */ 29 31 if(isset($URLInfo)) { 30 32 $basicIV = array( … … 46 48 47 49 /** Loading debug module */ 48 50 if($config->service['debugmode'] == true) { 51 if(isset($config->service['dbms'])) { 52 switch($config->service['dbms']) { 53 case 'mysqli': require_once(ROOT. "/library/components/Needlworks.Debug.MySQLi.php");break; 54 case 'mysql': default: require_once(ROOT. "/library/components/Needlworks.Debug.MySQL.php"); break; 55 } 56 } else require_once(ROOT. "/library/components/Needlworks.Debug.MySQL.php"); 57 } 58 49 59 /** Loading components / models / views */ 50 60 require_once (ROOT.'/library/include.'.$context->URLInfo['interfaceType'].'.php');
