mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #1458 from ravage84/patch-2
Added return before redirects
This commit is contained in:
commit
4590b7d553
1 changed files with 4 additions and 4 deletions
|
@ -56,7 +56,7 @@
|
|||
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
|
||||
<?php if ($wannaUseSession): ?>
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved'));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
return $this->redirect(array('action' => 'index'));
|
||||
<?php else: ?>
|
||||
$this->flash(__('<?php echo ucfirst(strtolower($currentModelName)); ?> saved.'), array('action' => 'index'));
|
||||
<?php endif; ?>
|
||||
|
@ -99,7 +99,7 @@
|
|||
if ($this-><?php echo $currentModelName; ?>->save($this->request->data)) {
|
||||
<?php if ($wannaUseSession): ?>
|
||||
$this->Session->setFlash(__('The <?php echo strtolower($singularHumanName); ?> has been saved'));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
return $this->redirect(array('action' => 'index'));
|
||||
<?php else: ?>
|
||||
$this->flash(__('The <?php echo strtolower($singularHumanName); ?> has been saved.'), array('action' => 'index'));
|
||||
<?php endif; ?>
|
||||
|
@ -145,7 +145,7 @@
|
|||
if ($this-><?php echo $currentModelName; ?>->delete()) {
|
||||
<?php if ($wannaUseSession): ?>
|
||||
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted'));
|
||||
$this->redirect(array('action' => 'index'));
|
||||
return $this->redirect(array('action' => 'index'));
|
||||
<?php else: ?>
|
||||
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted'), array('action' => 'index'));
|
||||
<?php endif; ?>
|
||||
|
@ -155,5 +155,5 @@
|
|||
<?php else: ?>
|
||||
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted'), array('action' => 'index'));
|
||||
<?php endif; ?>
|
||||
$this->redirect(array('action' => 'index'));
|
||||
return $this->redirect(array('action' => 'index'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue