aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-18 14:17:33 -0800
committerzotlabs <mike@macgirvin.com>2018-01-18 14:17:33 -0800
commit89aa882c95b4d01bd7bf6ff461c1dcefdedea7bd (patch)
tree672bdd787b969c495d2a279da14c0781adb89a29 /include
parent62e3083f23283d59c8e76c1bd8ccb2a07403551c (diff)
parenta0e1a8e0a20df640ef951dee4fb3c6ed19faee03 (diff)
downloadvolse-hubzilla-89aa882c95b4d01bd7bf6ff461c1dcefdedea7bd.tar.gz
volse-hubzilla-89aa882c95b4d01bd7bf6ff461c1dcefdedea7bd.tar.bz2
volse-hubzilla-89aa882c95b4d01bd7bf6ff461c1dcefdedea7bd.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include')
-rw-r--r--include/import.php3
-rw-r--r--include/nav.php32
-rw-r--r--include/taxonomy.php22
-rw-r--r--include/zid.php14
4 files changed, 16 insertions, 55 deletions
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/nav.php b/include/nav.php
index 8566cc58c..9c88541d1 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -100,38 +100,6 @@ EOT;
if(local_channel()) {
-
-
- $nav['network'] = array('network', t('Activity'), "", t('Network Activity'),'network_nav_btn');
- $nav['network']['all'] = [ 'network', t('View your network activity'), '','' ];
- $nav['network']['mark'] = array('', t('Mark all activity notifications seen'), '','');
-
- $nav['home'] = array('channel/' . $channel['channel_address'], t('Channel Home'), "", t('Channel home'),'home_nav_btn');
- $nav['home']['all'] = [ 'channel/' . $channel['channel_address'], t('View your channel home'), '' , '' ];
- $nav['home']['mark'] = array('', t('Mark all channel notifications seen'), '','');
-
-
- $nav['intros'] = array('connections/ifpending', t('Connections'), "", t('Connections'),'connections_nav_btn');
- if(is_site_admin())
- $nav['registrations'] = array('admin/accounts', t('Registrations'), "", t('Registrations'),'registrations_nav_btn');
-
-
- $nav['notifications'] = array('notifications/system', t('Notices'), "", t('Notifications'),'notifications_nav_btn');
- $nav['notifications']['all']=array('notifications/system', t('View all notifications'), "", "");
- $nav['notifications']['mark'] = array('', t('Mark all system notifications seen'), '','');
-
- $nav['messages'] = array('mail/combined', t('Mail'), "", t('Private mail'),'mail_nav_btn');
- $nav['messages']['all']=array('mail/combined', t('View your private messages'), "", "");
- $nav['messages']['mark'] = array('', t('Mark all private messages seen'), '','');
- $nav['messages']['inbox'] = array('mail/inbox', t('Inbox'), "", t('Inbox'));
- $nav['messages']['outbox']= array('mail/outbox', t('Outbox'), "", t('Outbox'));
- $nav['messages']['new'] = array('mail/new', t('New Message'), "", t('New Message'));
-
-
- $nav['all_events'] = array('events', t('Events'), "", t('Event Calendar'),'events_nav_btn');
- $nav['all_events']['all']=array('events', t('View events'), "", "");
- $nav['all_events']['mark'] = array('', t('Mark all events seen'), '','');
-
if(! $_SESSION['delegate']) {
$nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn');
}
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);
-
}
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 = '<a' . $match[1] . ' href="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
+
+ $arr = [ 'zid' => ((strpos($match[1],'zrl')) ? true : false), 'url' => $match[2] ];
+ call_hooks('zidify', $arr);
+
+ $replace = '<a' . $match[1] . ' href="' . (intval($arr['zid']) ? zid($arr['url']) : $arr['url']) . '"';
$x = str_replace($match[0], $replace, $match[0]);
@@ -136,8 +139,11 @@ function zidify_callback($match) {
}
function zidify_img_callback($match) {
- $is_zid = ((feature_enabled(local_channel(), 'sendzid')) || (strpos($match[1], 'zrl')) ? true : false);
- $replace = '<img' . $match[1] . ' src="' . (($is_zid) ? zid($match[2]) : $match[2]) . '"';
+
+ $arr = [ 'zid' => ((strpos($match[1],'zrl')) ? true : false), 'url' => $match[2] ];
+ call_hooks('zidify', $arr);
+
+ $replace = '<img' . $match[1] . ' src="' . (intval($arr['zid']) ? zid($arr['url']) : $arr['url']) . '"';
$x = str_replace($match[0], $replace, $match[0]);