/var/www/dotart.info/data/www/dotart.info/framework/db/CDbConnection.php(382)
370 throw new CDbException('CDbConnection.connectionString cannot be empty.'); 371 try 372 { 373 Yii::trace('Opening DB connection','system.db.CDbConnection'); 374 $this->_pdo=$this->createPdoInstance(); 375 $this->initConnection($this->_pdo); 376 $this->_active=true; 377 } 378 catch(PDOException $e) 379 { 380 if(YII_DEBUG) 381 { 382 throw new CDbException('CDbConnection failed to open the DB connection: '. 383 $e->getMessage(),(int)$e->getCode(),$e->errorInfo); 384 } 385 else 386 { 387 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException'); 388 throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo); 389 } 390 } 391 } 392 } 393 394 /**
#0 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/db/CDbConnection.php(330): CDbConnection->open() 325 public function setActive($value) 326 { 327 if($value!=$this->_active) 328 { 329 if($value) 330 $this->open(); 331 else 332 $this->close(); 333 } 334 } 335 |
#1 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/db/CDbConnection.php(308): CDbConnection->setActive(true) 303 */ 304 public function init() 305 { 306 parent::init(); 307 if($this->autoConnect) 308 $this->setActive(true); 309 } 310 311 /** 312 * Returns whether the DB connection is established. 313 * @return boolean whether the DB connection is established |
#2 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/base/CModule.php(387): CDbConnection->init() 382 if(!isset($config['enabled']) || $config['enabled']) 383 { 384 Yii::trace("Loading \"$id\" application component",'system.CModule'); 385 unset($config['enabled']); 386 $component=Yii::createComponent($config); 387 $component->init(); 388 return $this->_components[$id]=$component; 389 } 390 } 391 } 392 |
#3 |
+
–
/var/www/dotart.info/data/www/dotart.info/protected/extensions/tstranslation/models/ExtLanguages.php(18): CModule->getComponent("db") 13 return parent::model($className); 14 } 15 16 public function getDbConnection() { 17 $connectionID = Yii::app()->getComponent('messages')->connectionID; 18 if(Yii::app()->getComponent($connectionID) === null) { 19 throw new TsTranslationException('There is no connection component defined with name "'.$connectionID.'", which you passed in "messages" component as "connectionID".'); 20 } 21 return Yii::app()->getComponent($connectionID); 22 } 23 |
#4 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/db/ar/CActiveRecord.php(1428): ExtLanguages->getDbConnection() 1423 { 1424 if($checkScopes && ($criteria=$this->getDbCriteria(false))!==null && $criteria->alias!='') 1425 $alias=$criteria->alias; 1426 else 1427 $alias=$this->_alias; 1428 return $quote ? $this->getDbConnection()->getSchema()->quoteTableName($alias) : $alias; 1429 } 1430 1431 /** 1432 * Sets the table alias to be used in queries. 1433 * @param string $alias the table alias to be used in queries. The alias should NOT be quoted. |
#5 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/db/ar/CActiveRecord.php(1534): CActiveRecord->getTableAlias(true) 1529 * @return CActiveRecord[] the records found. An empty array is returned if none is found. 1530 */ 1531 public function findAllByAttributes($attributes,$condition='',$params=array()) 1532 { 1533 Yii::trace(get_class($this).'.findAllByAttributes()','system.db.ar.CActiveRecord'); 1534 $prefix=$this->getTableAlias(true).'.'; 1535 $criteria=$this->getCommandBuilder()->createColumnCriteria($this->getTableSchema(),$attributes,$condition,$params,$prefix); 1536 return $this->query($criteria,true); 1537 } 1538 1539 /** |
#6 |
+
–
/var/www/dotart.info/data/www/dotart.info/protected/extensions/tstranslation/components/TsTranslationComponent.php(58): CActiveRecord->findAllByAttributes(array("status" => 1), array("order" => "`ordering`")) 53 * 54 * @param string $listAttribute 55 * @return array or string 56 */ 57 public static function getActiveLanguages($listAttribute = 'name') { 58 $languages = ExtLanguages::model()->findAllByAttributes(array('status'=>1), array('order' => '`ordering`')); 59 if($listAttribute) { 60 $languageList = CHtml::listData($languages, 'code2', $listAttribute); 61 return $languageList; 62 } 63 return $languages; |
#7 |
+
–
/var/www/dotart.info/data/www/dotart.info/protected/extensions/tstranslation/components/TsTranslation.php(131): TsTranslationComponent::getActiveLanguages("asDefault") 126 } 127 128 private function _getExistedLanguage($langCode, $onlyActive = true) 129 { 130 if($onlyActive === true) { 131 $langList = TsTranslationComponent::getActiveLanguages('asDefault'); 132 } else { 133 $langList = TsTranslationComponent::getAvailableLanguages('asDefault'); 134 } 135 136 if(isset($langList[$langCode])) { |
#8 |
+
–
/var/www/dotart.info/data/www/dotart.info/protected/extensions/tstranslation/components/TsTranslation.php(82): TsTranslation->_getExistedLanguage("ru") 77 if($newLang !== $sessionLang) { 78 $_lang = $this->_getExistedLanguage($newLang); 79 } 80 } elseif ($requestLang !== null) { 81 if($requestLang !== $sessionLang) { 82 $_lang = $this->_getExistedLanguage($requestLang); 83 } 84 } elseif ($_lang === null) { 85 $_lang = TsTranslationComponent::getDefaultLanguage('code2'); 86 } 87 Yii::app()->request->cookies['_lang'] = new CHttpCookie ('_lang', $_lang, array( |
#9 |
+
–
/var/www/dotart.info/data/www/dotart.info/protected/extensions/tstranslation/components/TsTranslation.php(44): TsTranslation->setTsLanguage() 39 40 Yii::app()->setImport(array( 41 'tstranslation.models.*', 42 'tstranslation.components.*', 43 )); 44 $this->setTsLanguage(); 45 46 parent::init(); 47 } 48 49 /** |
#10 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/base/CModule.php(387): TsTranslation->init() 382 if(!isset($config['enabled']) || $config['enabled']) 383 { 384 Yii::trace("Loading \"$id\" application component",'system.CModule'); 385 unset($config['enabled']); 386 $component=Yii::createComponent($config); 387 $component->init(); 388 return $this->_components[$id]=$component; 389 } 390 } 391 } 392 |
#11 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/base/CModule.php(523): CModule->getComponent("tstranslation") 518 * Loads static application components. 519 */ 520 protected function preloadComponents() 521 { 522 foreach($this->preload as $id) 523 $this->getComponent($id); 524 } 525 526 /** 527 * Preinitializes the module. 528 * This method is called at the beginning of the module constructor. |
#12 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/base/CApplication.php(163): CModule->preloadComponents() 158 $this->initSystemHandlers(); 159 $this->registerCoreComponents(); 160 161 $this->configure($config); 162 $this->attachBehaviors($this->behaviors); 163 $this->preloadComponents(); 164 165 $this->init(); 166 } 167 168 |
#13 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/YiiBase.php(125): CApplication->__construct("/var/www/dotart.info/data/www/dotart.info/protected/config/main....") 120 * to the constructor of the application class. 121 * @return mixed the application instance 122 */ 123 public static function createApplication($class,$config=null) 124 { 125 return new $class($config); 126 } 127 128 /** 129 * Returns the application singleton or null if the singleton has not been created yet. 130 * @return CApplication the application singleton, null if the singleton has not been created yet. |
#14 |
+
–
/var/www/dotart.info/data/www/dotart.info/framework/YiiBase.php(98): YiiBase::createApplication("CWebApplication", "/var/www/dotart.info/data/www/dotart.info/protected/config/main....") 093 * If not, the directory will be defaulted to 'protected'. 094 * @return CWebApplication 095 */ 096 public static function createWebApplication($config=null) 097 { 098 return self::createApplication('CWebApplication',$config); 099 } 100 101 /** 102 * Creates a console application instance. 103 * @param mixed $config application configuration. |
#15 |
+
–
/var/www/dotart.info/data/www/dotart.info/index.php(28): YiiBase::createWebApplication("/var/www/dotart.info/data/www/dotart.info/protected/config/main....") 23 // change the following paths if necessary 24 $config=dirname(__FILE__).'/protected/config/main.php'; 25 26 // Register loader classes of Composer 27 require(__DIR__ . '/protected/extensions/quare/vendor/autoload.php'); 28 $app = Yii::createWebApplication($config)->run(); 29 ?> |