Exemplo n.º 1
0
 public function loadModel($id)
 {
     $model = FAI_TICKETS::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 2
0
 public function loadModel($id)
 {
     $model = FAI_TICKETS::model()->find(array('select' => '*', 'condition' => 'id=:id AND memb___id=:memb___id', 'params' => array(':id' => $id, ':memb___id' => Yii::app()->user->username)));
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }