/var/www/hosts/framework/db/ar/CActiveRecord.php(2364)
2352 2353 /** 2354 * Constructor. 2355 * @param CActiveRecord $model the model instance 2356 * @throws CDbException if specified table for active record class cannot be found in the database 2357 */ 2358 public function __construct($model) 2359 { 2360 $this->_modelClassName=get_class($model); 2361 2362 $tableName=$model->tableName(); 2363 if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null) 2364 throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.', 2365 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName))); 2366 if($table->primaryKey===null) 2367 { 2368 $table->primaryKey=$model->primaryKey(); 2369 if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey])) 2370 $table->columns[$table->primaryKey]->isPrimaryKey=true; 2371 elseif(is_array($table->primaryKey)) 2372 { 2373 foreach($table->primaryKey as $name) 2374 { 2375 if(isset($table->columns[$name])) 2376 $table->columns[$name]->isPrimaryKey=true;
| #0 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(411): CActiveRecordMetaData->__construct() 406 { 407 $className=get_class($this); 408 if(!array_key_exists($className,self::$_md)) 409 { 410 self::$_md[$className]=null; // preventing recursive invokes of {@link getMetaData()} via {@link __get()} 411 self::$_md[$className]=new CActiveRecordMetaData($this); 412 } 413 return self::$_md[$className]; 414 } 415 416 /** |
| #1 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(658): CActiveRecord->getMetaData() 653 * Returns the metadata of the table that this AR belongs to 654 * @return CDbTableSchema the metadata of the table that this AR belongs to 655 */ 656 public function getTableSchema() 657 { 658 return $this->getMetaData()->tableSchema; 659 } 660 661 /** 662 * Returns the command builder used by this AR. 663 * @return CDbCommandBuilder the command builder used by this AR |
| #2 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(1486): CActiveRecord->getTableSchema() 1481 */ 1482 public function findByPk($pk,$condition='',$params=array()) 1483 { 1484 Yii::trace(get_class($this).'.findByPk()','system.db.ar.CActiveRecord'); 1485 $prefix=$this->getTableAlias(true).'.'; 1486 $criteria=$this->getCommandBuilder()->createPkCriteria($this->getTableSchema(),$pk,$condition,$params,$prefix); 1487 return $this->query($criteria); 1488 } 1489 1490 /** 1491 * Finds all active records with the specified primary keys. |
| #3 |
+
–
/var/www/hosts/lk.usoft.ru/protected/modules/navigator/NavigatorModule.php(159): CActiveRecord->findByPk() 154 if (!$id) { 155 throw new CHttpException(404, 'Страница не найдена.'); 156 } 157 158 if (!isset($this->pages[$id])) { 159 $model = Pages::model()->findByPk($id); 160 161 if ($model === null) { 162 throw new CHttpException(404, 'Страница не найдена.'); 163 } 164 Yii::import('tags.models.ContentView'); |
| #4 |
+
–
/var/www/hosts/lk.usoft.ru/protected/fcomponents/Controller.php(246): NavigatorModule->page() 241 242 // if ($user->info['type'] == 'user_friend' && !in_array('tests', $REQ)) { 243 // header("Location: " . SystemRegistry::getInstance()->config['host'] . "tests"); 244 // } 245 246 $page = Yii::app()->getModule('navigator')->page(); 247 //check access 248 // `page_access` не использовалось в старой системе. его можно использовать для хранения новых типов доступов 249 250 //-----------болшой и страшной костыл---------------- 251 if(!Yii::app()->user->isGuest && UserAccessRule::isBanned() && $page['page_url'] != 'logout') $this->redirect('/logout'); |
| #5 |
+
–
/var/www/hosts/framework/web/CController.php(310): Controller->beforeAction() 305 public function runAction($action) 306 { 307 $priorAction=$this->_action; 308 $this->_action=$action; 309 310 if ($this->beforeAction($action)) { 311 312 if ($action->runWithParams($this->getActionParams())===false) { 313 $this->invalidActionParams($action); 314 } else { 315 $this->afterAction($action); |
| #6 |
+
–
/var/www/hosts/framework/web/CController.php(290): CController->runAction() 285 */ 286 public function runActionWithFilters($action,$filters) 287 { 288 289 if(empty($filters)) { 290 $this->runAction($action); 291 } else { 292 $priorAction=$this->_action; 293 $this->_action=$action; 294 CFilterChain::create($this,$action,$filters)->run(); 295 $this->_action=$priorAction; |
| #7 |
+
–
/var/www/hosts/framework/web/CController.php(268): CController->runActionWithFilters() 263 if (($parent=$this->getModule())===null) { 264 $parent=Yii::app(); 265 } 266 267 if ($parent->beforeControllerAction($this,$action)) { 268 $this->runActionWithFilters($action,$this->filters()); 269 $parent->afterControllerAction($this,$action); 270 } 271 } else { 272 $this->missingAction($actionID); 273 } |
| #8 |
+
–
/var/www/hosts/framework/web/CWebApplication.php(282): CController->run() 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
| #9 |
+
–
/var/www/hosts/framework/web/CWebApplication.php(141): CWebApplication->runController() 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. |
| #10 |
+
–
/var/www/hosts/framework/base/CApplication.php(180): CWebApplication->processRequest() 175 public function run() 176 { 177 if($this->hasEventHandler('onBeginRequest')) 178 $this->onBeginRequest(new CEvent($this)); 179 register_shutdown_function(array($this,'end'),0,false); 180 $this->processRequest(); 181 if($this->hasEventHandler('onEndRequest')) 182 $this->onEndRequest(new CEvent($this)); 183 } 184 185 /** |
| #11 |
+
–
/var/www/hosts/lk.usoft.ru/index.php(68): CApplication->run() 63 //Yii::setPathOfAlias('templates', $dirname_file .DIRECTORY_SEPARATOR.'templates'); 64 Yii::setPathOfAlias('core', INDEX_DIR . DIRECTORY_SEPARATOR . 'core'); 65 require_once(__DIR__ . DIRECTORY_SEPARATOR . 'protected' . DIRECTORY_SEPARATOR . 'vendors' . DIRECTORY_SEPARATOR . 'Loader.php'); 66 Yii::registerAutoloader(array('Loader', 'systemMainAutoload')); 67 68 Yii::createWebApplication($config_yii_path)->run(); |