Browse Source

Updated bake templates to use CakeRequest::allowMethod()

ADmad 12 years ago
parent
commit
1da79080ac

+ 1 - 1
lib/Cake/Console/Templates/default/actions/controller_actions.ctp

@@ -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.'));

+ 1 - 1
lib/Cake/Test/bake_compare/Controller/ActionsUsingSessions.ctp

@@ -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 {

+ 1 - 1
lib/Cake/Test/bake_compare/Controller/ActionsWithNoSessions.ctp

@@ -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 {