Permalink
Browse files

Merge pull request #1344 from Octobit/patch-1

Errors during a save redirect incorrectly to page resulting in creation of new record.
  • Loading branch information...
realityking committed Jul 5, 2012
2 parents 6f33bd0 + 4cc4616 commit b6f342019cd63e1ff4fe691e9223ea950fd71f78
Showing with 5 additions and 5 deletions.
  1. +5 −5 libraries/legacy/controller/form.php
@@ -685,7 +685,7 @@ public function save($key = null, $urlVar = null)
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
- . $this->getRedirectToItemAppend($recordId, $key), false
+ . $this->getRedirectToItemAppend($recordId, $urlVar), false
)
);
@@ -705,7 +705,7 @@ public function save($key = null, $urlVar = null)
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
- . $this->getRedirectToItemAppend($recordId, $key), false
+ . $this->getRedirectToItemAppend($recordId, $urlVar), false
)
);
@@ -725,7 +725,7 @@ public function save($key = null, $urlVar = null)
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
- . $this->getRedirectToItemAppend($recordId, $key), false
+ . $this->getRedirectToItemAppend($recordId, $urlVar), false
)
);
@@ -754,7 +754,7 @@ public function save($key = null, $urlVar = null)
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
- . $this->getRedirectToItemAppend($recordId, $key), false
+ . $this->getRedirectToItemAppend($recordId, $urlVar), false
)
);
break;
@@ -768,7 +768,7 @@ public function save($key = null, $urlVar = null)
$this->setRedirect(
JRoute::_(
'index.php?option=' . $this->option . '&view=' . $this->view_item
- . $this->getRedirectToItemAppend(null, $key), false
+ . $this->getRedirectToItemAppend(null, $urlVar), false
)
);
break;

0 comments on commit b6f3420

Please sign in to comment.