web access very cool

This commit is contained in:
vladislav.khorev committed 2015-07-02 08:37:15 +00:00
1 parent 760ddd06ee
commit 482fb1edc4
51 files changed
+1780 -350

No files matched your search

+8 -1
View File
@@ -29,9 +29,10 @@ class Journal extends CActiveRecord
return array(
array('name', 'required'),
array('title, description', 'safe'),
array('hidden, geoCategory, main', 'numerical', 'integerOnly'=>true),
// The following rule is used by search().
// @todo Please remove those attributes that should not be searched.
array('id, name, title, description', 'safe', 'on'=>'search'),
array('id, name, title, description, hidden, geoCategory, main', 'safe', 'on'=>'search'),
);
}
@@ -87,6 +88,12 @@ class Journal extends CActiveRecord
));
}
public static function getCurrentUserJournal()
{
return Journal::model()->find('name=:name', array(':name' => Yii::app()->user->name . '_journal'));
}
/**
* Returns the static model of the specified AR class.
* Please note that you should have this exact method in all your CActiveRecord descendants!