From 20ad5da89a093afe5b1c378728c51715d9c5ccc8 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 12 May 2014 00:22:02 +0200 Subject: [PATCH] Fixed mass tag redirect --- src/Controllers/TagController.php | 6 +++++- src/routes.php | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Controllers/TagController.php b/src/Controllers/TagController.php index e7d3635c..8198cab1 100644 --- a/src/Controllers/TagController.php +++ b/src/Controllers/TagController.php @@ -111,13 +111,17 @@ class TagController Messenger::message('Tag renamed successfully.'); } - public function massTagRedirectAction() + public function massTagRedirectView() { $context = getContext(); $context->viewName = 'tag-list-wrapper'; Access::assert(new Privilege(Privilege::MassTag)); + } + public function massTagRedirectAction() + { + $this->massTagRedirectView(); $suppliedOldPage = intval(InputHelper::get('old-page')); $suppliedOldQuery = InputHelper::get('old-query'); $suppliedQuery = InputHelper::get('query'); diff --git a/src/routes.php b/src/routes.php index 4e442986..e333f4d7 100644 --- a/src/routes.php +++ b/src/routes.php @@ -83,7 +83,8 @@ $tagValidation = \Chibi\Router::register(['TagController', 'renameAction'], 'POST', '/tags-rename', $tagValidation); \Chibi\Router::register(['TagController', 'mergeView'], 'GET', '/tags-merge', $tagValidation); \Chibi\Router::register(['TagController', 'mergeAction'], 'POST', '/tags-merge', $tagValidation); -\Chibi\Router::register(['TagController', 'massTagRedirectAction'], 'GET', '/mass-tag-redirect', $tagValidation); +\Chibi\Router::register(['TagController', 'massTagRedirectView'], 'GET', '/mass-tag-redirect', $tagValidation); +\Chibi\Router::register(['TagController', 'massTagRedirectAction'], 'POST', '/mass-tag-redirect', $tagValidation); $userValidation = [