diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-06-11 14:14:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-11 14:14:59 +0200 |
commit | d5d22a6d07917865c44148ad76f43c65a929a890 (patch) | |
tree | 8d666317f8845377adc2645d49da9c3779775c38 /index.php | |
parent | 88535f20a9c1bde4d0461561a5a60be6b2bf4745 (diff) | |
parent | 49cc8e5d747e6c3504803cf4fa1589fa204e32b5 (diff) | |
download | Shaarli-d5d22a6d07917865c44148ad76f43c65a929a890.tar.gz Shaarli-d5d22a6d07917865c44148ad76f43c65a929a890.tar.zst Shaarli-d5d22a6d07917865c44148ad76f43c65a929a890.zip |
Merge pull request #890 from Lucas-C/taglist-cloud_improvments
Tagcloud/list improvments
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -805,6 +805,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
805 | 805 | ||
806 | $tagList = array(); | 806 | $tagList = array(); |
807 | foreach($tags as $key => $value) { | 807 | foreach($tags as $key => $value) { |
808 | if (in_array($key, $filteringTags)) { | ||
809 | continue; | ||
810 | } | ||
808 | // Tag font size scaling: | 811 | // Tag font size scaling: |
809 | // default 15 and 30 logarithm bases affect scaling, | 812 | // default 15 and 30 logarithm bases affect scaling, |
810 | // 22 and 6 are arbitrary font sizes for max and min sizes. | 813 | // 22 and 6 are arbitrary font sizes for max and min sizes. |
@@ -829,12 +832,17 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
829 | exit; | 832 | exit; |
830 | } | 833 | } |
831 | 834 | ||
832 | // -------- Tag cloud | 835 | // -------- Tag list |
833 | if ($targetPage == Router::$PAGE_TAGLIST) | 836 | if ($targetPage == Router::$PAGE_TAGLIST) |
834 | { | 837 | { |
835 | $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all'; | 838 | $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all'; |
836 | $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : []; | 839 | $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : []; |
837 | $tags = $LINKSDB->linksCountPerTag($filteringTags, $visibility); | 840 | $tags = $LINKSDB->linksCountPerTag($filteringTags, $visibility); |
841 | foreach ($filteringTags as $tag) { | ||
842 | if (array_key_exists($tag, $tags)) { | ||
843 | unset($tags[$tag]); | ||
844 | } | ||
845 | } | ||
838 | 846 | ||
839 | if (! empty($_GET['sort']) && $_GET['sort'] === 'alpha') { | 847 | if (! empty($_GET['sort']) && $_GET['sort'] === 'alpha') { |
840 | alphabetical_sort($tags, false, true); | 848 | alphabetical_sort($tags, false, true); |