コード例 #1
0
ファイル: IdeasPresenter.php プロジェクト: rawac/agenda
 public function actionClone($id)
 {
     $record = $this->model->get($id);
     if (!$record) {
         $this->flashMessage("Takový námět neexistuje.", "danger");
         $this->redirect("default");
     }
     $newId = $this->model->makeClone($id);
     $this->model->update($newId, array("user_id" => $this->user->id, "active" => 1));
     $this->flashMessage("Byla vytvořena nová kopie námětu {$record->name}.", "success");
     $this->redirect("id", $newId);
 }