From c331e585b8ada2c281815193df0d3e1b172ebe0e Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 17 Jan 2018 15:25:30 -0800 Subject: remove sendzid core code from core (put in plugin where it belongs) --- include/import.php | 3 ++- include/zid.php | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/import.php b/include/import.php index 51791347a..9920df8be 100644 --- a/include/import.php +++ b/include/import.php @@ -82,7 +82,8 @@ function import_channel($channel, $account_id, $seize) { 'channel_r_storage', 'channel_r_pages', 'channel_w_stream', 'channel_w_wall', 'channel_w_comment', 'channel_w_mail', 'channel_w_like', 'channel_w_tagwall', 'channel_w_chat', 'channel_w_storage', 'channel_w_pages', 'channel_a_republish', - 'channel_a_delegate', 'perm_limits', 'channel_password', 'channel_salt' + 'channel_a_delegate', 'perm_limits', 'channel_password', 'channel_salt', + 'channel_moved' ]; $clean = array(); diff --git a/include/zid.php b/include/zid.php index 6ebc9a6ab..b3a7d1e6a 100644 --- a/include/zid.php +++ b/include/zid.php @@ -127,8 +127,11 @@ function clean_query_string($s = '') { * @return string */ function zidify_callback($match) { - $is_zid = ((feature_enabled(local_channel(), 'sendzid')) || (strpos($match[1], 'zrl')) ? true : false); - $replace = ' ((strpos($match[1],'zrl')) ? true : false), 'url' => $match[2] ]; + call_hooks('zidify', $arr); + + $replace = ' ((strpos($match[1],'zrl')) ? true : false), 'url' => $match[2] ]; + call_hooks('zidify', $arr); + + $replace = ' Date: Wed, 17 Jan 2018 20:10:49 -0800 Subject: simplify dir_tagadelic dramatically --- include/taxonomy.php | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'include') diff --git a/include/taxonomy.php b/include/taxonomy.php index 278925391..393b8718e 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -313,39 +313,25 @@ function dir_tagadelic($count = 0, $hub = '') { $count = intval($count); - $dirmode = get_config('system','directory_mode'); - - if(($dirmode == DIRECTORY_MODE_STANDALONE) && (! $hub)) { - $hub = \App::get_hostname(); - } - - if($hub) - $hub_query = " and xtag_hash in (select hubloc_hash from hubloc where hubloc_host = '" . protect_sprintf(dbesc($hub)) . "') "; - else - $hub_query = ''; - - if($hub_query) { - // Fetch tags + if($hub) { $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 $hub_query + where xtag_flags = 0 and xtag_hash in (select hubloc_hash from hubloc where hubloc_host = '%s' ) group by xtag_term order by total desc %s", + dbesc($hub), ((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(); - + return []; return Zotlabs\Text\Tagadelic::calc($r); - } -- cgit v1.2.3