diff --git a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp index 463af3799..0cde5c638 100644 --- a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp +++ b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp @@ -131,12 +131,11 @@ * @return void */ public function delete($id = null) { - $this->->id = $id; if (!$this->->exists($id)) { throw new NotFoundException(__('Invalid ')); } $this->request->allowMethod('post', 'delete'); - if ($this->->delete()) { + if ($this->->delete($id)) { $this->Flash->success(__('The has been deleted.')); } else { diff --git a/lib/Cake/Test/bake_compare/Controller/ActionsUsingSessions.ctp b/lib/Cake/Test/bake_compare/Controller/ActionsUsingSessions.ctp index 2fd1933c0..34e3fc23f 100644 --- a/lib/Cake/Test/bake_compare/Controller/ActionsUsingSessions.ctp +++ b/lib/Cake/Test/bake_compare/Controller/ActionsUsingSessions.ctp @@ -77,12 +77,11 @@ * @return void */ public function delete($id = null) { - $this->BakeArticle->id = $id; if (!$this->BakeArticle->exists($id)) { throw new NotFoundException(__('Invalid bake article')); } $this->request->allowMethod('post', 'delete'); - if ($this->BakeArticle->delete()) { + if ($this->BakeArticle->delete($id)) { $this->Flash->success(__('The bake article has been deleted.')); } else { $this->Flash->error(__('The bake article could not be deleted. Please, try again.')); diff --git a/lib/Cake/Test/bake_compare/Controller/ActionsWithNoSessions.ctp b/lib/Cake/Test/bake_compare/Controller/ActionsWithNoSessions.ctp index a7079a778..cfdd24f7f 100644 --- a/lib/Cake/Test/bake_compare/Controller/ActionsWithNoSessions.ctp +++ b/lib/Cake/Test/bake_compare/Controller/ActionsWithNoSessions.ctp @@ -71,12 +71,11 @@ * @return void */ public function delete($id = null) { - $this->BakeArticle->id = $id; if (!$this->BakeArticle->exists($id)) { throw new NotFoundException(__('Invalid bake article')); } $this->request->allowMethod('post', 'delete'); - if ($this->BakeArticle->delete()) { + if ($this->BakeArticle->delete($id)) { return $this->flash(__('The bake article has been deleted.'), array('action' => 'index')); } else { return $this->flash(__('The bake article could not be deleted. Please, try again.'), array('action' => 'index'));