/** * Delete a transcript */ public function actionDelete($roomId, $year, $month, $day) { // are we admin? if ($this->user->isAdmin()) { // form date $date = $year . '-' . $month . '-' . $day; try { // try to instantiate the transcript... $transcript = new Transcript($date, $roomId); } catch (TranscriptNotFoundException $e) { $this->renderAction('invalid'); } // delete it $transcript->delete($date, $this->user->getShortName()); // redirect back $this->redirectTo('/transcripts/'); } else { $this->renderTemplate('Error404/error404'); } }