aboutsummaryrefslogtreecommitdiffstats
path: root/include/taxonomy.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2017-12-27 16:45:33 +0100
committerMario <mario@mariovavti.com>2017-12-27 16:45:33 +0100
commit4a71fb08315b2b785114d90318adb51f6fa78472 (patch)
treebbc0b4fa95ad236135af7ec70abee76901b82c79 /include/taxonomy.php
parent8e626a0142e586da7f1bfbf5d35a518159e75b88 (diff)
parent5a8efc10d8ebaf5e81009eaaff8b0c5524a04aa3 (diff)
downloadvolse-hubzilla-4a71fb08315b2b785114d90318adb51f6fa78472.tar.gz
volse-hubzilla-4a71fb08315b2b785114d90318adb51f6fa78472.tar.bz2
volse-hubzilla-4a71fb08315b2b785114d90318adb51f6fa78472.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include/taxonomy.php')
-rw-r--r--include/taxonomy.php25
1 files changed, 19 insertions, 6 deletions
diff --git a/include/taxonomy.php b/include/taxonomy.php
index a13a9cf77..a646df28c 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -313,12 +313,25 @@ function dir_tagadelic($count = 0) {
$count = intval($count);
- // Fetch tags
- $r = q("select xtag_term as term, count(xtag_term) as total from xtag where xtag_flags = 0
- group by xtag_term order by total desc %s",
- ((intval($count)) ? "limit $count" : '')
- );
-
+ $dirmode = get_config('system','directory_mode');
+
+ if($dirmode == DIRECTORY_MODE_STANDALONE) {
+ // Fetch tags
+ $r = q("select xtag_term as term, count(xtag_term) as total from xtag
+ left join hubloc on xtag_hash = hubloc_hash
+ where xtag_flags = 0 and hubloc_url = '%s'
+ group by xtag_term order by total desc %s",
+ dbesc(z_root()),
+ ((intval($count)) ? "limit $count" : '')
+ );
+ }
+ else {
+ // Fetch tags
+ $r = q("select xtag_term as term, count(xtag_term) as total from xtag where xtag_flags = 0
+ group by xtag_term order by total desc %s",
+ ((intval($count)) ? "limit $count" : '')
+ );
+ }
if(! $r)
return array();