Exemplo n.º 1
0
 /**
  * Displays a single Picture model.
  * @param integer $id
  * @return mixed
  */
 public function actionPicture($id, $size = 'full')
 {
     if (($model = Picture::findOne($id)) === null) {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
     if (!$model) {
         $model = new Picture();
     }
     $this->redirect($model->directlink($size), 301);
 }