aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-10-10 16:06:09 -0700
committerzotlabs <mike@macgirvin.com>2017-10-10 16:06:09 -0700
commit4203d43c58044582fdab9e46cddef7e7fa7b23fa (patch)
tree66bb85a48115c85ac2b60b199047325aef2ab5b1 /include
parent6a2c5e07310e723d020e4b6d4123181db5c805db (diff)
parent07ae4319501ac6edc024a849b4d060f171f27178 (diff)
downloadvolse-hubzilla-4203d43c58044582fdab9e46cddef7e7fa7b23fa.tar.gz
volse-hubzilla-4203d43c58044582fdab9e46cddef7e7fa7b23fa.tar.bz2
volse-hubzilla-4203d43c58044582fdab9e46cddef7e7fa7b23fa.zip
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge
Diffstat (limited to 'include')
-rw-r--r--include/nav.php71
1 files changed, 13 insertions, 58 deletions
diff --git a/include/nav.php b/include/nav.php
index 44026e1e9..b5f713145 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -62,12 +62,9 @@ EOT;
if($banner === false)
$banner = get_config('system','sitename');
- if(! get_pconfig(local_channel(), 'system', 'experimental_notif')) {
- //the notifications template is in hdr.tpl
- App::$page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array(
- //we could additionally use this to display important system notifications e.g. for updates
- ));
- }
+ App::$page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array(
+ //we could additionally use this to display important system notifications e.g. for updates
+ ));
$techlevel = get_account_techlevel();
@@ -94,8 +91,6 @@ EOT;
$nav['loginmenu'][] = Array('rmagic',t('Remote authentication'),'',t('Click to authenticate to your home hub'),'rmagic_nav_btn');
}
-
-
if(local_channel()) {
if($chans && count($chans) > 1 && feature_enabled(local_channel(),'nav_channel_select'))
$nav['channels'] = $chans;
@@ -171,51 +166,10 @@ 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');
}
-
$nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn');
-
- $nav['files'] = array('sharedwithme', t('Shared Files'), "", t('New files shared with me'),'files_nav_btn');
-
- }
-
- if(! get_config('system', 'disable_discover_tab')) {
- $nav['pubs'] = array('pubstream', t('Public stream'), "", t('Public stream activity'),'pubs_nav_btn');
- $nav['pubs']['all'] = [ 'pubstream', t('View public stream'), '','' ];
- $nav['pubs']['mark'] = array('', t('Mark all public stream items seen'), '','');
}
/**
@@ -233,13 +187,15 @@ EOT;
// turned off until somebody discovers this and figures out a good location for it.
$powered_by = '';
- $active_app = q("SELECT app_url FROM app WHERE app_channel = %d AND app_name = '%s' LIMIT 1",
- intval($channel['channel_id']),
- dbesc(\App::$nav_sel['raw_name'])
- );
-
- if($active_app) {
- $url = $active_app[0]['app_url'];
+ if(App::$profile_uid && App::$nav_sel['raw_name']) {
+ $active_app = q("SELECT app_url FROM app WHERE app_channel = %d AND app_name = '%s' LIMIT 1",
+ intval(App::$profile_uid),
+ dbesc(App::$nav_sel['raw_name'])
+ );
+
+ if($active_app) {
+ $url = $active_app[0]['app_url'];
+ }
}
//app bin
@@ -297,7 +253,6 @@ EOT;
App::$page['nav'] .= replace_macros($tpl, array(
'$baseurl' => z_root(),
- '$experimental_notif' => get_pconfig(local_channel(), 'system', 'experimental_notif'),
'$fulldocs' => t('Help'),
'$sitelocation' => $sitelocation,
'$nav' => $x['nav'],
@@ -318,7 +273,7 @@ EOT;
'$addapps' => t('Add Apps'),
'$orderapps' => t('Arrange Apps'),
'$sysapps_toggle' => t('Toggle System Apps'),
- '$url' => $url
+ '$url' => (($url) ? $url : App::$cmd)
));
if(x($_SESSION, 'reload_avatar') && $observer) {