/var/www/hosts/lk.usoft.ru/protected/modules/test/models/Tests.php(310)
298 return $result; 299 300 } 301 302 protected function afterFind() 303 { 304 parent::afterFind(); 305 306 if ($this->question_limit) { 307 $this->limit = $this->question_limit; 308 } else { 309 // Приводим результат STAT-отношения к int 310 $this->limit = (int)$this->questionCount; 311 } 312 } 313 314 protected function afterSave() 315 { 316 parent::afterSave(); 317 318 Yii::import('tags.models.Tag'); 319 Tag::model()->updateAfterSave($this->tags); 320 /* 321 if ($this->isNewRecord) { 322 $now = date("Y-m-d H:i:s");
| #0 |
+
–
/var/www/hosts/framework/db/ar/CActiveFinder.php(1405): CStatElement->queryOneMany() 1400 public function query() 1401 { 1402 if(preg_match('/^\s*(.*?)\((.*)\)\s*$/',$this->relation->foreignKey,$matches)) 1403 $this->queryManyMany($matches[1],$matches[2]); 1404 else 1405 $this->queryOneMany(); 1406 } 1407 1408 private function queryOneMany() 1409 { 1410 $relation=$this->relation; |
| #1 |
+
–
/var/www/hosts/framework/db/ar/CActiveFinder.php(472): CStatElement->query() 467 $pk[$name]=$baseRecord->$name; 468 $this->records[serialize($pk)]=$baseRecord; 469 } 470 471 foreach($this->stats as $stat) 472 $stat->query(); 473 474 if(!$this->children) 475 return; 476 477 $params=array(); |
| #2 |
+
–
/var/www/hosts/framework/db/ar/CActiveFinder.php(163): CJoinElement->lazyFind() 158 * This method is internally invoked by {@link CActiveRecord} to support lazy loading. 159 * @param CActiveRecord $baseRecord the base record whose related objects are to be loaded 160 */ 161 public function lazyFind($baseRecord) 162 { 163 $this->_joinTree->lazyFind($baseRecord); 164 if(!empty($this->_joinTree->children)) 165 { 166 foreach($this->_joinTree->children as $child) 167 $child->afterFind(); 168 } |
| #3 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(281): CActiveFinder->lazyFind() 276 else 277 $r=$name; 278 unset($this->_related[$name]); 279 280 $finder=$this->getActiveFinder($r); 281 $finder->lazyFind($this); 282 283 if(!isset($this->_related[$name])) 284 { 285 if($relation instanceof CHasManyRelation) 286 $this->_related[$name]=array(); |
| #4 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(143): CActiveRecord->getRelated() 138 elseif(isset($this->getMetaData()->columns[$name])) 139 return null; 140 elseif(isset($this->_related[$name])) 141 return $this->_related[$name]; 142 elseif(isset($this->getMetaData()->relations[$name])) 143 return $this->getRelated($name); 144 else 145 return parent::__get($name); 146 } 147 148 /** |
| #5 |
+
–
/var/www/hosts/lk.usoft.ru/protected/modules/test/models/Tests.php(310): CActiveRecord->__get() 305 306 if ($this->question_limit) { 307 $this->limit = $this->question_limit; 308 } else { 309 // Приводим результат STAT-отношения к int 310 $this->limit = (int)$this->questionCount; 311 } 312 } 313 314 protected function afterSave() 315 { |
| #6 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(1868): Tests->afterFind() 1863 $record->_attributes[$name]=$value; 1864 } 1865 $record->_pk=$record->getPrimaryKey(); 1866 $record->attachBehaviors($record->behaviors()); 1867 if($callAfterFind) 1868 $record->afterFind(); 1869 return $record; 1870 } 1871 else 1872 return null; 1873 } |
| #7 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(1889): CActiveRecord->populateRecord() 1884 public function populateRecords($data,$callAfterFind=true,$index=null) 1885 { 1886 $records=array(); 1887 foreach($data as $attributes) 1888 { 1889 if(($record=$this->populateRecord($attributes,$callAfterFind))!==null) 1890 { 1891 if($index===null) 1892 $records[]=$record; 1893 else 1894 $records[$record->$index]=$record; |
| #8 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(1352): CActiveRecord->populateRecords() 1347 if(empty($criteria->with)) 1348 { 1349 if(!$all) 1350 $criteria->limit=1; 1351 $command=$this->getCommandBuilder()->createFindCommand($this->getTableSchema(),$criteria,$this->getTableAlias()); 1352 return $all ? $this->populateRecords($command->queryAll(), true, $criteria->index) : $this->populateRecord($command->queryRow()); 1353 } 1354 else 1355 { 1356 $finder=$this->getActiveFinder($criteria->with); 1357 return $finder->query($criteria,$all); |
| #9 |
+
–
/var/www/hosts/framework/db/ar/CActiveRecord.php(1471): CActiveRecord->query() 1466 */ 1467 public function findAll($condition='',$params=array()) 1468 { 1469 Yii::trace(get_class($this).'.findAll()','system.db.ar.CActiveRecord'); 1470 $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); 1471 return $this->query($criteria,true); 1472 } 1473 1474 /** 1475 * Finds a single active record with the specified primary key. 1476 * See {@link find()} for detailed explanation about $condition and $params. |
| #10 |
+
–
/var/www/hosts/lk.usoft.ru/protected/controllers/SiteController.php(342): CActiveRecord->findAll() 337 Yii::import('application.modules.test.models.Questions'); 338 $tests = Tests::model() 339 ->isAccess() 340 ->sort_ordered() 341 ->isPoolAccess() 342 ->findAll(); 343 /* Для старого модуля 344 $tests = Yii::app()->db->createCommand() 345 ->select('id') 346 ->from('tests') 347 ->where('visible = 1') |
| #11 |
+
–
/var/www/hosts/framework/web/actions/CInlineAction.php(49): SiteController->actionSitemapxml() 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 else 49 return $controller->$methodName(); 50 } 51 52 } |
| #12 |
+
–
/var/www/hosts/framework/web/CController.php(312): CInlineAction->runWithParams() 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); 316 } 317 } |
| #13 |
+
–
/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; |
| #14 |
+
–
/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 } |
| #15 |
+
–
/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))); |
| #16 |
+
–
/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. |
| #17 |
+
–
/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 /** |
| #18 |
+
–
/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(); |