public function renderDetail($no) { $item = $this->ics->Read($no); if ($item) { $this->template->item = $item; } else { $this->redirect('Homepage:default'); } }
public function actionRating($no) { $item = $this->ics->Read($no); if ($item && $this->ics->isRatingOpen($this->user->id, $no)) { $this->item_no = $no; $this->template->item = $item; } else { $this->redirect('Account:ratings'); } }