// fix redirection on edit page if errors are present
This commit is contained in:
1 parent
6bbc296e84
commit
699107c6a0
1 file changed
+8
-3
@@ -636,9 +636,9 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->errors = array_unique($this->errors);
|
$this->errors = array_unique($this->errors);
|
||||||
if (count($this->errors) > 0)
|
if (!empty($this->errors))
|
||||||
{
|
{
|
||||||
// if we have errors, we stay on the form instead of moving to the list
|
// if we have errors, we stay on the form instead of going back to the list
|
||||||
$this->display = 'edit';
|
$this->display = 'edit';
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -731,7 +731,12 @@ class AdminControllerCore extends Controller
|
|||||||
}
|
}
|
||||||
$this->errors = array_unique($this->errors);
|
$this->errors = array_unique($this->errors);
|
||||||
if (!empty($this->errors))
|
if (!empty($this->errors))
|
||||||
return;
|
{
|
||||||
|
// if we have errors, we stay on the form instead of going back to the list
|
||||||
|
$this->display = 'edit';
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($object))
|
if (isset($object))
|
||||||
return $object;
|
return $object;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user