aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorLucas Cimon <lucas.cimon@gmail.com>2017-06-02 17:58:26 +0200
committerLucas Cimon <lucas.cimon@gmail.com>2017-06-09 10:58:12 +0200
commit49cc8e5d747e6c3504803cf4fa1589fa204e32b5 (patch)
tree8d666317f8845377adc2645d49da9c3779775c38 /index.php
parent88535f20a9c1bde4d0461561a5a60be6b2bf4745 (diff)
downloadShaarli-49cc8e5d747e6c3504803cf4fa1589fa204e32b5.tar.gz
Shaarli-49cc8e5d747e6c3504803cf4fa1589fa204e32b5.tar.zst
Shaarli-49cc8e5d747e6c3504803cf4fa1589fa204e32b5.zip
Tagcloud/list improvments
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 9 insertions, 1 deletions
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)
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);