public function loadData() { if (!($limit = (int) $this->module->rssCount)) { throw new CHttpException(404); } $criteria = new CDbCriteria(); $criteria->order = 't.date DESC'; $criteria->limit = $limit; $this->title = $this->yupe->siteName; $this->description = $this->yupe->siteDescription; $alias = Yii::app()->getRequest()->getQuery('alias'); if (!empty($categoryId)) { $category = PublicationCategory::model()->published()->findByAlias($alias); if (is_null($category)) { throw new CHttpException(404); } $this->title = $category->title; $this->description = $category->short_text; $criteria->scopes(['category' => $category->id]); } $this->data = Publication::model()->cache($this->yupe->coreCacheTime)->published()->with('user')->findAll($criteria); }