示例#1
0
文件: Log.php 项目: chenyongze/d-a-m
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         $this->uid = Yii::app()->user->id;
         $this->uname = Yii::app()->user->name;
         $this->acttime = time();
         return true;
     } else {
         return false;
     }
 }
示例#2
0
 protected function beforeSave()
 {
     if (parent::beforeSave()) {
         $this->id = (int) $this->id;
         $this->database_id = (int) $this->database_id;
         return true;
     } else {
         return false;
     }
 }