diff options
author | zotlabs <mike@macgirvin.com> | 2018-01-08 14:50:58 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-01-08 14:50:58 -0800 |
commit | 75804d7ce57a476c85a486c807ea1f5a75235a0e (patch) | |
tree | 13794288d5ffca739248d9ec017ef1a4cef9b93d /include/taxonomy.php | |
parent | d4af870bb6500747790e6f196afeb4d75011185d (diff) | |
parent | 0600817ef75d19d1ec91ba822f8a6938d442824e (diff) | |
download | volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.gz volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.tar.bz2 volse-hubzilla-75804d7ce57a476c85a486c807ea1f5a75235a0e.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/taxonomy.php')
-rw-r--r-- | include/taxonomy.php | 25 |
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(); |