aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/visitor/TagController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/front/controller/visitor/TagController.php')
-rw-r--r--application/front/controller/visitor/TagController.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/application/front/controller/visitor/TagController.php b/application/front/controller/visitor/TagController.php
index a0bc1d1b..c176f43f 100644
--- a/application/front/controller/visitor/TagController.php
+++ b/application/front/controller/visitor/TagController.php
@@ -11,6 +11,8 @@ use Slim\Http\Response;
11 * Class TagController 11 * Class TagController
12 * 12 *
13 * Slim controller handle tags. 13 * Slim controller handle tags.
14 *
15 * TODO: check redirections with new helper
14 */ 16 */
15class TagController extends ShaarliVisitorController 17class TagController extends ShaarliVisitorController
16{ 18{
@@ -27,10 +29,10 @@ class TagController extends ShaarliVisitorController
27 // In case browser does not send HTTP_REFERER, we search a single tag 29 // In case browser does not send HTTP_REFERER, we search a single tag
28 if (null === $referer) { 30 if (null === $referer) {
29 if (null !== $newTag) { 31 if (null !== $newTag) {
30 return $response->withRedirect('./?searchtags='. urlencode($newTag)); 32 return $this->redirect($response, '/?searchtags='. urlencode($newTag));
31 } 33 }
32 34
33 return $response->withRedirect('./'); 35 return $this->redirect($response, '/');
34 } 36 }
35 37
36 $currentUrl = parse_url($referer); 38 $currentUrl = parse_url($referer);
@@ -81,7 +83,7 @@ class TagController extends ShaarliVisitorController
81 83
82 // If the referrer is not provided, we can update the search, so we failback on the bookmark list 84 // If the referrer is not provided, we can update the search, so we failback on the bookmark list
83 if (empty($referer)) { 85 if (empty($referer)) {
84 return $response->withRedirect('./'); 86 return $this->redirect($response, '/');
85 } 87 }
86 88
87 $tagToRemove = $args['tag'] ?? null; 89 $tagToRemove = $args['tag'] ?? null;