/mnt/data/shnoulle/nginx/www/master/framework/db/CDbConnection.php(399)
387 throw new CDbException('CDbConnection.connectionString cannot be empty.'); 388 try 389 { 390 Yii::trace('Opening DB connection','system.db.CDbConnection'); 391 $this->_pdo=$this->createPdoInstance(); 392 $this->initConnection($this->_pdo); 393 $this->_active=true; 394 } 395 catch(PDOException $e) 396 { 397 if(YII_DEBUG) 398 { 399 throw new CDbException('CDbConnection failed to open the DB connection: '. 400 $e->getMessage(),(int)$e->getCode(),$e->errorInfo); 401 } 402 else 403 { 404 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException'); 405 throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo); 406 } 407 } 408 } 409 } 410 411 /**
#0 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/db/CDbConnection.php(347): CDbConnection->open() 342 public function setActive($value) 343 { 344 if($value!=$this->_active) 345 { 346 if($value) 347 $this->open(); 348 else 349 $this->close(); 350 } 351 } 352 |
#1 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/db/CDbConnection.php(325): CDbConnection->setActive(true) 320 */ 321 public function init() 322 { 323 parent::init(); 324 if($this->autoConnect) 325 $this->setActive(true); 326 } 327 328 /** 329 * Returns whether the DB connection is established. 330 * @return boolean whether the DB connection is established |
#2 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/base/CModule.php(394): CDbConnection->init() 389 if(!isset($config['enabled']) || $config['enabled']) 390 { 391 Yii::trace("Loading \"$id\" application component",'system.CModule'); 392 unset($config['enabled']); 393 $component=Yii::createComponent($config); 394 $component->init(); 395 return $this->_components[$id]=$component; 396 } 397 } 398 } 399 |
#3 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/base/CApplication.php(459): CModule->getComponent("db") 454 * Returns the database connection component. 455 * @return CDbConnection the database connection 456 */ 457 public function getDb() 458 { 459 return $this->getComponent('db'); 460 } 461 462 /** 463 * Returns the error handler component. 464 * @return CErrorHandler the error handler application component. |
#4 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/db/ar/CActiveRecord.php(639): CApplication->getDb() 634 { 635 if(self::$db!==null) 636 return self::$db; 637 else 638 { 639 self::$db=Yii::app()->getDb(); 640 if(self::$db instanceof CDbConnection) 641 return self::$db; 642 else 643 throw new CDbException(Yii::t('yii','Active Record requires a "db" CDbConnection application component.')); 644 } |
#5 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/db/ar/CActiveRecord.php(2389): CActiveRecord->getDbConnection() 2384 public function __construct($model) 2385 { 2386 $this->_modelClassName=get_class($model); 2387 2388 $tableName=$model->tableName(); 2389 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2390 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2391 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName))); 2392 2393 if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null) 2394 { |
#6 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/db/ar/CActiveRecord.php(413): CActiveRecordMetaData->__construct(SettingGlobal) 408 { 409 $className=get_class($this); 410 if(!array_key_exists($className,self::$_md)) 411 { 412 self::$_md[$className]=null; // preventing recursive invokes of {@link getMetaData()} via {@link __get()} 413 self::$_md[$className]=new CActiveRecordMetaData($this); 414 } 415 return self::$_md[$className]; 416 } 417 418 /** |
#7 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/db/ar/CActiveRecord.php(682): CActiveRecord->getMetaData() 677 * @param string $name attribute name 678 * @return boolean whether this AR has the named attribute (table column). 679 */ 680 public function hasAttribute($name) 681 { 682 return isset($this->getMetaData()->columns[$name]); 683 } 684 685 /** 686 * Returns the named attribute value. 687 * If this is a new record and the attribute is not set before, |
#8 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/models/LSActiveRecord.php(34): CActiveRecord->hasAttribute("created") 29 * @return array 30 */ 31 public function behaviors() 32 { 33 $aBehaviors = array(); 34 $sCreateFieldName = ($this->hasAttribute('created') ? 'created' : null); 35 $sUpdateFieldName = ($this->hasAttribute('modified') ? 'modified' : null); 36 $sDriverName = Yii::app()->db->getDriverName(); 37 if ($sDriverName == 'sqlsrv' || $sDriverName == 'dblib') { 38 $sTimestampExpression = new CDbExpression('GETDATE()'); 39 } else { |
#9 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/db/ar/CActiveRecord.php(398): LSActiveRecord->behaviors() 393 if(isset(self::$_models[$className])) 394 return self::$_models[$className]; 395 else 396 { 397 $model=self::$_models[$className]=new $className(null); 398 $model->attachBehaviors($model->behaviors()); 399 return $model; 400 } 401 } 402 403 /** |
#10 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/models/SettingGlobal.php(33): CActiveRecord::model("SettingGlobal") 28 * @inheritdoc 29 * @return CActiveRecord 30 */ 31 public static function model($class = __CLASS__) 32 { 33 return parent::model($class); 34 } 35 36 /** @inheritdoc */ 37 public function tableName() 38 { |
#11 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/helpers/globalsettings_helper.php(23): SettingGlobal::model() 18 injectglobalsettings(); 19 20 21 function injectglobalsettings() 22 { 23 $settings = SettingGlobal::model()->findAll(); 24 25 //if ($dbvaluearray!==false) 26 if (count($settings) > 0) { 27 foreach ($settings as $setting) { 28 Yii::app()->setConfig($setting->getAttribute('stg_name'), $setting->getAttribute('stg_value')); |
#12 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/helpers/globalsettings_helper.php(18): injectglobalsettings() 13 * See COPYRIGHT.php for copyright notices and details. 14 * 15 */ 16 //Ensure script is not run directly, avoid path disclosure 17 //if (!isset($homedir) || isset($_REQUEST['$homedir'])) {die("Cannot run this script directly");} 18 injectglobalsettings(); 19 20 21 function injectglobalsettings() 22 { 23 $settings = SettingGlobal::model()->findAll(); |
#13 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/YiiBase.php(328): require("/mnt/data/shnoulle/nginx/www/master/application/helpers/globalse...") 323 if($isClass) 324 { 325 if($forceInclude) 326 { 327 if(is_file($path.'.php')) 328 require($path.'.php'); 329 else 330 throw new CException(Yii::t('yii','Alias "{alias}" is invalid. Make sure it points to an existing PHP file and the file is readable.',array('{alias}'=>$alias))); 331 self::$_imports[$alias]=$className; 332 } 333 else |
#14 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/core/LSYii_Application.php(180): YiiBase::import("application.helpers.globalsettings_helper", true) 175 * @param string $helper 176 * @return void 177 */ 178 public function loadHelper($helper) 179 { 180 Yii::import('application.helpers.'.$helper.'_helper', true); 181 } 182 183 /** 184 * Loads a library 185 * |
#15 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/core/LSYii_Controller.php(70): LSYii_Application->loadHelper("globalsettings") 65 * @param string $helper 66 * @return void 67 */ 68 public function loadHelper($helper) 69 { 70 Yii::app()->loadHelper($helper); 71 } 72 73 /** 74 * Loads a library 75 * |
#16 |
+
–
/mnt/data/shnoulle/nginx/www/master/application/core/LSYii_Controller.php(39): LSYii_Controller->loadHelper("globalsettings") 34 $this->_checkInstallation(); 35 36 //Yii::app()->session->init(); 37 $this->loadLibrary('LS.LS'); 38 // This will setConfig from database 39 $this->loadHelper('globalsettings'); 40 $this->loadHelper('common'); 41 $this->loadHelper('expressions.em_manager'); 42 $this->loadHelper('replacements'); 43 $this->_init(); 44 } |
#17 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(359): LSYii_Controller->__construct("admin", null) 354 require($classFile); 355 if(class_exists($className,false) && is_subclass_of($className,'CController')) 356 { 357 $id[0]=strtolower($id[0]); 358 return array( 359 new $className($controllerID.$id,$owner===$this?null:$owner), 360 $this->parseActionParams($route), 361 ); 362 } 363 return null; 364 } |
#18 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(276): CWebApplication->createController("") 271 * @param string $route the route of the current request. See {@link createController} for more details. 272 * @throws CHttpException if the controller could not be created. 273 */ 274 public function runController($route) 275 { 276 if(($ca=$this->createController($route))!==null) 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); |
#19 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/web/CWebApplication.php(141): CWebApplication->runController("admin") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#20 |
+
–
/mnt/data/shnoulle/nginx/www/master/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#21 |
+
–
/mnt/data/shnoulle/nginx/www/master/index.php(194): CApplication->run() 189 require_once APPPATH . 'core/LSYii_Application' . EXT; 190 191 $config = require_once(APPPATH . 'config/internal' . EXT); 192 193 Yii::$enableIncludePath = false; 194 Yii::createApplication('LSYii_Application', $config)->run(); 195 196 /* End of file index.php */ 197 /* Location: ./index.php */ |