diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -790,7 +790,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
790 | // -------- Tag cloud | 790 | // -------- Tag cloud |
791 | if ($targetPage == Router::$PAGE_TAGCLOUD) | 791 | if ($targetPage == Router::$PAGE_TAGCLOUD) |
792 | { | 792 | { |
793 | $tags= $LINKSDB->allTags(); | 793 | $visibility = ! empty($_SESSION['privateonly']) ? 'private' : 'all'; |
794 | $filteringTags = isset($_GET['searchtags']) ? explode(' ', $_GET['searchtags']) : array(); | ||
795 | $tags = $LINKSDB->linksCountPerTag($filteringTags, $visibility); | ||
794 | 796 | ||
795 | // We sort tags alphabetically, then choose a font size according to count. | 797 | // We sort tags alphabetically, then choose a font size according to count. |
796 | // First, find max value. | 798 | // First, find max value. |
@@ -824,6 +826,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
824 | } | 826 | } |
825 | 827 | ||
826 | $data = array( | 828 | $data = array( |
829 | 'search_tags' => implode(' ', $filteringTags), | ||
827 | 'tags' => $tagList, | 830 | 'tags' => $tagList, |
828 | ); | 831 | ); |
829 | $pluginManager->executeHooks('render_tagcloud', $data, array('loggedin' => isLoggedIn())); | 832 | $pluginManager->executeHooks('render_tagcloud', $data, array('loggedin' => isLoggedIn())); |
@@ -1351,7 +1354,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
1351 | 'link' => $link, | 1354 | 'link' => $link, |
1352 | 'link_is_new' => false, | 1355 | 'link_is_new' => false, |
1353 | 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''), | 1356 | 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''), |
1354 | 'tags' => $LINKSDB->allTags(), | 1357 | 'tags' => $LINKSDB->linksCountPerTag(), |
1355 | ); | 1358 | ); |
1356 | $pluginManager->executeHooks('render_editlink', $data); | 1359 | $pluginManager->executeHooks('render_editlink', $data); |
1357 | 1360 | ||
@@ -1420,7 +1423,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) | |||
1420 | 'link_is_new' => $link_is_new, | 1423 | 'link_is_new' => $link_is_new, |
1421 | 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''), | 1424 | 'http_referer' => (isset($_SERVER['HTTP_REFERER']) ? escape($_SERVER['HTTP_REFERER']) : ''), |
1422 | 'source' => (isset($_GET['source']) ? $_GET['source'] : ''), | 1425 | 'source' => (isset($_GET['source']) ? $_GET['source'] : ''), |
1423 | 'tags' => $LINKSDB->allTags(), | 1426 | 'tags' => $LINKSDB->linksCountPerTag(), |
1424 | 'default_private_links' => $conf->get('privacy.default_private_links', false), | 1427 | 'default_private_links' => $conf->get('privacy.default_private_links', false), |
1425 | ); | 1428 | ); |
1426 | $pluginManager->executeHooks('render_editlink', $data); | 1429 | $pluginManager->executeHooks('render_editlink', $data); |