aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php24
1 files changed, 2 insertions, 22 deletions
diff --git a/index.php b/index.php
index 6ecb9a67..89a1e581 100644
--- a/index.php
+++ b/index.php
@@ -622,28 +622,7 @@ function renderPage($conf, $pluginManager, $bookmarkService, $history, $sessionM
622 622
623 // -------- Tag list 623 // -------- Tag list
624 if ($targetPage == Router::$PAGE_TAGLIST) { 624 if ($targetPage == Router::$PAGE_TAGLIST) {
625 $visibility = ! empty($_SESSION['visibility']) ? $_SESSION['visibility'] : ''; 625 header('Location: ./tag-list');
626 $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : [];
627 $tags = $bookmarkService->bookmarksCountPerTag($filteringTags, $visibility);
628
629 if (! empty($_GET['sort']) && $_GET['sort'] === 'alpha') {
630 alphabetical_sort($tags, false, true);
631 }
632
633 $searchTags = implode(' ', escape($filteringTags));
634 $data = [
635 'search_tags' => $searchTags,
636 'tags' => $tags,
637 ];
638 $pluginManager->executeHooks('render_taglist', $data, ['loggedin' => $loginManager->isLoggedIn()]);
639
640 foreach ($data as $key => $value) {
641 $PAGE->assign($key, $value);
642 }
643
644 $searchTags = ! empty($searchTags) ? $searchTags .' - ' : '';
645 $PAGE->assign('pagetitle', $searchTags . t('Tag list') .' - '. $conf->get('general.title', 'Shaarli'));
646 $PAGE->renderPage('tag.list');
647 exit; 626 exit;
648 } 627 }
649 628
@@ -1870,6 +1849,7 @@ $app->group('', function () {
1870 $this->get('/logout', '\Shaarli\Front\Controller\LogoutController:index')->setName('logout'); 1849 $this->get('/logout', '\Shaarli\Front\Controller\LogoutController:index')->setName('logout');
1871 $this->get('/picture-wall', '\Shaarli\Front\Controller\PictureWallController:index')->setName('picwall'); 1850 $this->get('/picture-wall', '\Shaarli\Front\Controller\PictureWallController:index')->setName('picwall');
1872 $this->get('/tag-cloud', '\Shaarli\Front\Controller\TagCloudController:cloud')->setName('tagcloud'); 1851 $this->get('/tag-cloud', '\Shaarli\Front\Controller\TagCloudController:cloud')->setName('tagcloud');
1852 $this->get('/tag-list', '\Shaarli\Front\Controller\TagCloudController:list')->setName('taglist');
1873 $this->get('/add-tag/{newTag}', '\Shaarli\Front\Controller\TagController:addTag')->setName('add-tag'); 1853 $this->get('/add-tag/{newTag}', '\Shaarli\Front\Controller\TagController:addTag')->setName('add-tag');
1874})->add('\Shaarli\Front\ShaarliMiddleware'); 1854})->add('\Shaarli\Front\ShaarliMiddleware');
1875 1855