Applying patch from ticket #1502 (fixing problem with redirect)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3600 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
dho 2006-10-05 09:17:47 +00:00
parent 4a9f72cefa
commit 899cf2bebf

View file

@ -247,7 +247,7 @@ class Scaffold extends Object{
$this->controllerClass->Session->setFlash(
'The ' . Inflector::humanize($this->modelKey) . ' has been ' . $success . '.');
$this->controllerClass->redirect(
Inflector::underscore($this->controllerClass->viewPath));
'/' . Inflector::underscore($this->controllerClass->viewPath));
} else {
return $this->controllerClass->flash(
'The ' . Inflector::humanize($this->modelKey) . ' has been ' . $success
@ -303,7 +303,7 @@ class Scaffold extends Object{
$this->controllerClass->Session->setFlash(
'The ' . Inflector::humanize($this->modelKey) . ' with id: ' . $id
. ' has been deleted.');
$this->controllerClass->redirect(Inflector::underscore($this->controllerClass->viewPath));
$this->controllerClass->redirect('/' . Inflector::underscore($this->controllerClass->viewPath));
} else {
return $this->controllerClass->flash(
'The ' . Inflector::humanize($this->modelKey) . ' with id: ' . $id
@ -315,7 +315,7 @@ class Scaffold extends Object{
$this->controllerClass->Session->setFlash(
'There was an error deleting the ' . Inflector::humanize($this->modelKey)
. ' with the id ' . $id);
$this->controllerClass->redirect(Inflector::underscore($this->controllerClass->viewPath));
$this->controllerClass->redirect('/' . Inflector::underscore($this->controllerClass->viewPath));
} else {
return $this->controllerClass->flash(
'There was an error deleting the ' . Inflector::humanize($this->modelKey)