From 49cc8e5d747e6c3504803cf4fa1589fa204e32b5 Mon Sep 17 00:00:00 2001 From: Lucas Cimon Date: Fri, 2 Jun 2017 17:58:26 +0200 Subject: Tagcloud/list improvments --- index.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 2ff2505a..85486eb5 100644 --- a/index.php +++ b/index.php @@ -805,6 +805,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) $tagList = array(); foreach($tags as $key => $value) { + if (in_array($key, $filteringTags)) { + continue; + } // Tag font size scaling: // default 15 and 30 logarithm bases affect scaling, // 22 and 6 are arbitrary font sizes for max and min sizes. @@ -829,12 +832,17 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) exit; } - // -------- Tag cloud + // -------- Tag list if ($targetPage == Router::$PAGE_TAGLIST) { $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all'; $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : []; $tags = $LINKSDB->linksCountPerTag($filteringTags, $visibility); + foreach ($filteringTags as $tag) { + if (array_key_exists($tag, $tags)) { + unset($tags[$tag]); + } + } if (! empty($_GET['sort']) && $_GET['sort'] === 'alpha') { alphabetical_sort($tags, false, true); -- cgit v1.2.3