Skip to content

Commit

Permalink
Updated bake templates to use CakeRequest::allowMethod()
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Feb 10, 2014
1 parent bea30e6 commit 1da7908
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
if (!$this-><?php echo $currentModelName; ?>->exists()) {
throw new NotFoundException(__('Invalid <?php echo strtolower($singularHumanName); ?>'));
}
$this->request->onlyAllow('post', 'delete');
$this->request->allowMethod('post', 'delete');
if ($this-><?php echo $currentModelName; ?>->delete()) {
<?php if ($wannaUseSession): ?>
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been deleted.'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
if (!$this->BakeArticle->exists()) {
throw new NotFoundException(__('Invalid bake article'));
}
$this->request->onlyAllow('post', 'delete');
$this->request->allowMethod('post', 'delete');
if ($this->BakeArticle->delete()) {
$this->Session->setFlash(__('The bake article has been deleted.'));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
if (!$this->BakeArticle->exists()) {
throw new NotFoundException(__('Invalid bake article'));
}
$this->request->onlyAllow('post', 'delete');
$this->request->allowMethod('post', 'delete');
if ($this->BakeArticle->delete()) {
return $this->flash(__('The bake article has been deleted.'), array('action' => 'index'));
} else {
Expand Down

0 comments on commit 1da7908

Please sign in to comment.