From d3cf879195a52b45b27d18674edde0d3c55c615c Mon Sep 17 00:00:00 2001 From: mattmemmesheimer Date: Sun, 16 Aug 2015 18:01:23 -0500 Subject: [PATCH] Updating deprecated SessionComponent::setFlash calls to FlashComponent magic calls. --- .../Templates/default/actions/controller_actions.ctp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp index b6b89a993..dfc309215 100644 --- a/lib/Cake/Console/Templates/default/actions/controller_actions.ctp +++ b/lib/Cake/Console/Templates/default/actions/controller_actions.ctp @@ -53,10 +53,10 @@ $this->->create(); if ($this->->save($this->request->data)) { - $this->Session->setFlash(__('The has been saved.')); + $this->Flash->success(__('The has been saved.')); return $this->redirect(array('action' => 'index')); } else { - $this->Session->setFlash(__('The could not be saved. Please, try again.')); + $this->Flash->error(__('The could not be saved. Please, try again.')); return $this->flash(__('The has been saved.'), array('action' => 'index')); @@ -94,10 +94,10 @@ if ($this->request->is(array('post', 'put'))) { if ($this->->save($this->request->data)) { - $this->Session->setFlash(__('The has been saved.')); + $this->Flash->success(__('The has been saved.')); return $this->redirect(array('action' => 'index')); } else { - $this->Session->setFlash(__('The could not be saved. Please, try again.')); + $this->Flash->error(__('The could not be saved. Please, try again.')); return $this->flash(__('The has been saved.'), array('action' => 'index')); @@ -138,9 +138,9 @@ $this->request->allowMethod('post', 'delete'); if ($this->->delete()) { - $this->Session->setFlash(__('The has been deleted.')); + $this->Flash->success(__('The has been deleted.')); } else { - $this->Session->setFlash(__('The could not be deleted. Please, try again.')); + $this->Flash->error(__('The could not be deleted. Please, try again.')); } return $this->redirect(array('action' => 'index'));