コード例 #1
0
ファイル: ModelBlog_Entry.php プロジェクト: rosko/Tempo-CMS
 public function beforeSave()
 {
     if ($this->hasAttribute('date') && !$this->date) {
         $this->date = new CDbExpression('NOW()');
     }
     return parent::beforeSave();
 }