Skip to content
Permalink
Browse files

Updated bake templates to use CakeRequest::allowMethod()

  • Loading branch information...
ADmad committed Feb 10, 2014
1 parent bea30e6 commit 1da79080ac6869237342c575dc40339b8c866c3e
@@ -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.'));
@@ -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 {
@@ -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 {

0 comments on commit 1da7908

Please sign in to comment.
You can’t perform that action at this time.