<commit_before><?php
/**
 * Created by JetBrains PhpStorm.
 * User: andrey
 * Date: 6/15/13
 * Time: 7:53 PM
 * To change this template use File | Settings | File Templates.
 */

class RssController extends YFrontController
{
    public function actions()
    {
        if (!($limit = (int)$this->module->rssCount)) {
            throw new CHttpException(404);
        }

        $criteria = new CDbCriteria;
        $criteria->order = 't.creation_date DESC';
        $criteria->params = array();
        $criteria->limit = $limit;

        $title = $this->yupe->siteName;
        $description = $this->yupe->siteDescription;

        $model = Yii::app()->request->getQuery('model');
        $modelId = (int)Yii::app()->request->getQuery('modelId');

        if(empty($model) || empty($modelId)) {
            throw new CHttpException(404);
        }

        $criteria->addCondition('model = :model')
            ->addCondition('model_id = :modelId');

        $criteria->params = array(
            ':model'    => $model,
            ':modelId'  => $modelId,
        );
<commit_msg>Правка контроллера RSS модуля Комментариев для нормального вывода с учетом использования NestedSets<commit_after><?php
/**
 * Created by JetBrains PhpStorm.
 * User: andrey
 * Date: 6/15/13
 * Time: 7:53 PM
 * To change this template use File | Settings | File Templates.
 */

class RssController extends YFrontController
{
    public function actions()
    {
        if (!($limit = (int)$this->module->rssCount)) {
            throw new CHttpException(404);
        }

        $criteria = new CDbCriteria;
        $criteria->order = 't.creation_date DESC';
        $criteria->params = array();
        $criteria->limit = $limit;

        $title = $this->yupe->siteName;
        $description = $this->yupe->siteDescription;

        $model = Yii::app()->request->getQuery('model');
        $modelId = (int)Yii::app()->request->getQuery('modelId');

        if(empty($model) || empty($modelId)) {
            throw new CHttpException(404);
        }

        $criteria->addCondition('model = :model')
            ->addCondition('model_id = :modelId')
            ->addCondition('t.id<>t.root');

        $criteria->params = array(
            ':model'    => $model,
            ':modelId'  => $modelId,
        );

{'fraction_non_alphanumeric': 0.15585546364823682, 'fraction_numerical': 0.012189812799303439, 'mean_word_length': 2.3794117647058823, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4329118', 'n_tokens_mistral': 733, 'n_tokens_neox': 704, 'n_words': 146}