/home/nick22/public_html/yii/framework/db/ar/CActiveFinder.php(215)
203 // named scope 204 $scopes=array(); 205 if(($pos=strpos($with,':'))!==false) 206 { 207 $scopes=explode(':',substr($with,$pos+1)); 208 $with=substr($with,0,$pos); 209 } 210 211 if(isset($parent->children[$with]) && $parent->children[$with]->master===null) 212 return $parent->children[$with]; 213 214 if(($relation=$parent->model->getActiveRelation($with))===null) 215 throw new CDbException(Yii::t('yii','Relation "{name}" is not defined in active record class "{class}".', 216 array('{class}'=>get_class($parent->model), '{name}'=>$with))); 217 218 $relation=clone $relation; 219 $model=CActiveRecord::model($relation->className); 220 if($relation instanceof CActiveRelation) 221 { 222 $oldAlias=$model->getTableAlias(false,false); 223 if(isset($options['alias'])) 224 $model->setTableAlias($options['alias']); 225 else if($relation->alias===null) 226 $model->setTableAlias($relation->name); 227 else
#0 |
+
–
/home/nick22/public_html/yii/framework/db/ar/CActiveFinder.php(310): CActiveFinder->buildJoinTree(CJoinElement, "wp_term_taxonomy") 305 306 // $with is an array, keys are relation name, values are relation spec 307 foreach($with as $key=>$value) 308 { 309 if(is_string($value)) // the value is a relation name 310 $this->buildJoinTree($parent,$value); 311 else if(is_string($key) && is_array($value)) 312 $this->buildJoinTree($parent,$key,$value); 313 } 314 } 315 } |
#1 |
+
–
/home/nick22/public_html/yii/framework/db/ar/CActiveFinder.php(49): CActiveFinder->buildJoinTree(CJoinElement, array("wp_term_taxonomy", "wp_terms")) 44 */ 45 public function __construct($model,$with) 46 { 47 $this->_builder=$model->getCommandBuilder(); 48 $this->_joinTree=new CJoinElement($this,$model); 49 $this->buildJoinTree($this->_joinTree,$with); 50 } 51 52 /** 53 * Do not call this method. This method is used internally to perform the relational query 54 * based on the given DB criteria. |
#2 |
+
–
/home/nick22/public_html/yii/framework/db/ar/CActiveRecord.php(1291): CActiveFinder->__construct(TermRelationships, array("wp_term_taxonomy", "wp_terms")) 1286 $command=$this->getCommandBuilder()->createFindCommand($this->getTableSchema(),$criteria); 1287 return $all ? $this->populateRecords($command->queryAll(), true, $criteria->index) : $this->populateRecord($command->queryRow()); 1288 } 1289 else 1290 { 1291 $finder=new CActiveFinder($this,$criteria->with); 1292 return $finder->query($criteria,$all); 1293 } 1294 } 1295 1296 /** |
#3 |
+
–
/home/nick22/public_html/yii/framework/db/ar/CActiveRecord.php(1406): CActiveRecord->query(CDbCriteria, true) 1401 */ 1402 public function findAll($condition='',$params=array()) 1403 { 1404 Yii::trace(get_class($this).'.findAll()','system.db.ar.CActiveRecord'); 1405 $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); 1406 return $this->query($criteria,true); 1407 } 1408 1409 /** 1410 * Finds a single active record with the specified primary key. 1411 * See {@link find()} for detailed explanation about $condition and $params. |
#4 |
+
–
/home/nick22/public_html/protected/modules/blog/models/TermRelationships.php(124): CActiveRecord->findAll(CDbCriteria) 119 $crit->select = array('object_id'); 120 $crit->join = 'left JOIN wp_term_taxonomy ON t.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id 121 left JOIN wp_terms ON wp_terms.term_id = wp_term_taxonomy.term_id'; 122 $crit->condition = 'wp_term_taxonomy.taxonomy = "category" and wp_terms.slug = :slug'; 123 $crit->params = array(':slug' => "$slug"); 124 $posts = $this->findAll($crit); 125 return $posts; 126 127 } 128 129 } |
#5 |
+
–
/home/nick22/public_html/protected/modules/blog/views/post/category.php(74): TermRelationships->getPostsByCategorySlug("programming-web-development") 69 $crit->condition = "wp_term_taxonomy.taxonomy = 'category' and wp_terms.slug=:cat"; 70 $crit->params = array(':cat' => "$cat"); 71 // $models = Terms::model()->findAll($criteria); 72 */ 73 $tagPosts = array(); 74 $models = TermRelationships::model()->getPostsByCategorySlug($tag); 75 foreach ($models as $ml) { 76 // foreach ($model as $k => $v) '<br />' . $k . " : " . $v . "<br />"; 77 78 //echo "<br />" . $ml->object_id . "<br />"; 79 $tagPosts[] = Posts::model()->findByPk($ml->object_id); |
#6 |
+
–
/home/nick22/public_html/yii/framework/web/CBaseController.php(127): require("/home/nick22/public_html/protected/modules/blog/views/post/categ...") 122 $data=$_data_; 123 if($_return_) 124 { 125 ob_start(); 126 ob_implicit_flush(false); 127 require($_viewFile_); 128 return ob_get_clean(); 129 } 130 else 131 require($_viewFile_); 132 } |
#7 |
+
–
/home/nick22/public_html/yii/framework/web/CBaseController.php(96): CBaseController->renderInternal("/home/nick22/public_html/protected/modules/blog/views/post/categ...", null, true) 091 { 092 $widgetCount=count($this->_widgetStack); 093 if(($renderer=Yii::app()->getViewRenderer())!==null && $renderer->fileExtension==='.'.CFileHelper::getExtension($viewFile)) 094 $content=$renderer->renderFile($this,$viewFile,$data,$return); 095 else 096 $content=$this->renderInternal($viewFile,$data,$return); 097 if(count($this->_widgetStack)===$widgetCount) 098 return $content; 099 else 100 { 101 $widget=end($this->_widgetStack); |
#8 |
+
–
/home/nick22/public_html/yii/framework/web/CController.php(871): CBaseController->renderFile("/home/nick22/public_html/protected/modules/blog/views/post/categ...", null, true) 866 */ 867 public function renderPartial($view,$data=null,$return=false,$processOutput=false) 868 { 869 if(($viewFile=$this->getViewFile($view))!==false) 870 { 871 $output=$this->renderFile($viewFile,$data,true); 872 if($processOutput) 873 $output=$this->processOutput($output); 874 if($return) 875 return $output; 876 else |
#9 |
+
–
/home/nick22/public_html/yii/framework/web/CController.php(784): CController->renderPartial("category", null, true) 779 */ 780 public function render($view,$data=null,$return=false) 781 { 782 if($this->beforeRender($view)) 783 { 784 $output=$this->renderPartial($view,$data,true); 785 if(($layoutFile=$this->getLayoutFile($this->layout))!==false) 786 $output=$this->renderFile($layoutFile,array('content'=>$output),true); 787 788 $this->afterRender($view,$output); 789 |
#10 |
+
–
/home/nick22/public_html/protected/modules/blog/controllers/PostController.php(35): CController->render("category") 30 public function actionCategory() { 31 32 if ($params = $this->getActionParams()) { 33 if (isset($params['cat'])) { 34 $category = $params['cat']; 35 $this->render('category'); 36 } 37 } 38 else { 39 $this->render('index'); 40 } |
#11 |
+
–
/home/nick22/public_html/yii/framework/web/actions/CInlineAction.php(50): PostController->actionCategory() 45 $controller=$this->getController(); 46 $method=new ReflectionMethod($controller, $methodName); 47 if($method->getNumberOfParameters()>0) 48 return $this->runWithParamsInternal($controller, $method, $params); 49 else 50 return $controller->$methodName(); 51 } 52 53 } |
#12 |
+
–
/home/nick22/public_html/yii/framework/web/CController.php(309): CInlineAction->runWithParams(array("cat" => "programming-web-development")) 304 { 305 $priorAction=$this->_action; 306 $this->_action=$action; 307 if($this->beforeAction($action)) 308 { 309 if($action->runWithParams($this->getActionParams())===false) 310 $this->invalidActionParams($action); 311 else 312 $this->afterAction($action); 313 } 314 $this->_action=$priorAction; |
#13 |
+
–
/home/nick22/public_html/yii/framework/web/CController.php(287): CController->runAction(CInlineAction) 282 * @see runAction 283 */ 284 public function runActionWithFilters($action,$filters) 285 { 286 if(empty($filters)) 287 $this->runAction($action); 288 else 289 { 290 $priorAction=$this->_action; 291 $this->_action=$action; 292 CFilterChain::create($this,$action,$filters)->run(); |
#14 |
+
–
/home/nick22/public_html/yii/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array()) 261 { 262 if(($parent=$this->getModule())===null) 263 $parent=Yii::app(); 264 if($parent->beforeControllerAction($this,$action)) 265 { 266 $this->runActionWithFilters($action,$this->filters()); 267 $parent->afterControllerAction($this,$action); 268 } 269 } 270 else 271 $this->missingAction($actionID); |
#15 |
+
–
/home/nick22/public_html/yii/framework/web/CWebApplication.php(276): CController->run("category") 271 { 272 list($controller,$actionID)=$ca; 273 $oldController=$this->_controller; 274 $this->_controller=$controller; 275 $controller->init(); 276 $controller->run($actionID); 277 $this->_controller=$oldController; 278 } 279 else 280 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 281 array('{route}'=>$route===''?$this->defaultController:$route))); |
#16 |
+
–
/home/nick22/public_html/yii/framework/web/CWebApplication.php(135): CWebApplication->runController("blog/post/category/cat/programming-web-development") 130 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 131 $_GET[$name]=$value; 132 } 133 else 134 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 135 $this->runController($route); 136 } 137 138 /** 139 * Registers the core application components. 140 * This method overrides the parent implementation by registering additional core components. |
#17 |
+
–
/home/nick22/public_html/yii/framework/base/CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#18 |
+
–
/home/nick22/public_html/index.php(24): CApplication->run() 19 $app = Yii::createWebApplication($config); 20 // adding Zend Framework autoloader 21 Yii::import('application.vendors.*'); 22 Yii::import("application.components.EZendAutoloader", true); 23 Yii::registerAutoloader(array('EZendAutoloader','loadClass'), true); 24 $app->run(); 25 26 27 28 29 // adding Zend Framework autoloader |