From 2f58aee4c473f5040ff3bfd0356157ac80202c01 Mon Sep 17 00:00:00 2001 From: Gert Date: Wed, 13 May 2015 16:25:02 +0200 Subject: [PATCH] always use redirect on page save --- classes/controller.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/controller.php b/classes/controller.php index b31bf697..ee3fdc13 100644 --- a/classes/controller.php +++ b/classes/controller.php @@ -86,6 +86,8 @@ class AdminController $success = call_user_func(array($this, $method)); } catch (\RuntimeException $e) { $success = true; + var_dump($e->getMessage() . '
getTraceAsString())); $this->admin->setMessage($e->getMessage()); } @@ -741,8 +743,8 @@ class AdminController } } - // Redirect to new location. - if ($obj instanceof Page\Page && ltrim($obj->route(), '/') != $this->admin->route) { + // Always redirect if a page was change, to refresh it + if ($obj instanceof Page\Page) { $this->setRedirect($this->view . '/' . $obj->route()); }