From 3d6564f7a82fd3db37eb25ceaa6f47dc88a19578 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sat, 3 May 2014 23:27:00 +0200 Subject: [PATCH] Fixed erroreous redirects --- src/Controllers/AuthController.php | 4 +++- src/Controllers/LogController.php | 2 +- src/Controllers/PostController.php | 2 +- src/Controllers/TagController.php | 1 + src/Controllers/UserController.php | 3 ++- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index d6d8cfde..88c0106c 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -30,6 +30,7 @@ class AuthController $context->layoutName = null; Auth::logout(); \Chibi\Util\Url::forward(\Chibi\Router::linkTo(['IndexController', 'indexAction'])); + exit; } public static function observeWorkFinish() @@ -50,8 +51,9 @@ class AuthController { \Chibi\Util\Url::forward(\Chibi\Util\Url::makeAbsolute($_SESSION['login-redirect-url'])); unset($_SESSION['login-redirect-url']); - return; + exit; } \Chibi\Util\Url::forward(\Chibi\Router::linkTo(['IndexController', 'indexAction'])); + exit; } } diff --git a/src/Controllers/LogController.php b/src/Controllers/LogController.php index 51872e3d..76542767 100644 --- a/src/Controllers/LogController.php +++ b/src/Controllers/LogController.php @@ -35,7 +35,7 @@ class LogController 'filter' => $formQuery, 'page' => 1 ])); - return; + exit; } Access::assert(Privilege::ViewLog); diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index 2021e372..a2d90b99 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -23,7 +23,7 @@ class PostController 'additionalInfo' => $additionalInfo, 'query' => $formQuery]); \Chibi\Util\Url::forward($url); - return; + exit; } $query = trim($query); diff --git a/src/Controllers/TagController.php b/src/Controllers/TagController.php index f8ff5cc2..26d23a91 100644 --- a/src/Controllers/TagController.php +++ b/src/Controllers/TagController.php @@ -155,5 +155,6 @@ class TagController if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery) $params['page'] = $suppliedOldPage; \Chibi\Util\Url::forward(\Chibi\Router::linkTo(['PostController', 'listAction'], $params)); + exit; } } diff --git a/src/Controllers/UserController.php b/src/Controllers/UserController.php index 7eb25bd4..a81a8887 100644 --- a/src/Controllers/UserController.php +++ b/src/Controllers/UserController.php @@ -128,6 +128,7 @@ class UserController \Chibi\Util\Url::forward(\Chibi\Router::linkTo(['IndexController', 'indexAction'])); LogHelper::log('{user} removed {subject}\'s account', ['subject' => TextHelper::reprUser($name)]); + exit; } public function settingsAction($name) @@ -348,7 +349,7 @@ class UserController if (Auth::isLoggedIn()) { \Chibi\Util\Url::forward(\Chibi\Router::linkTo(['IndexController', 'indexAction'])); - return; + exit; } $suppliedName = InputHelper::get('name');