X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=index.php;h=85486eb50d72ea16be69fe59e261612356e2a435;hb=57ee53d6c6be4b641764b0a635b2998c6cdc8197;hp=823eb8dea7834100f40a3525770ecdce29b2f20f;hpb=ac94db1e36c77d52c316b5fa4e8e36b9d1e38b9e;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index 823eb8de..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); @@ -1425,7 +1433,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) 'url' => $url, 'description' => $description, 'tags' => $tags, - 'private' => $private + 'private' => $private, ); } else { $link['linkdate'] = $link['created']->format(LinkDB::LINK_DATE_FORMAT);