aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-04-03 21:36:29 -0400
committerAndrew Manning <tamanning@zoho.com>2016-04-03 21:36:29 -0400
commit0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f (patch)
treea92197de4503ec52889dc05483493f4df1a305b8 /include/nav.php
parent99d9456b3addc651a68874ddd391d25684252c4d (diff)
parentb4c1baada1fba46d4d75f40a7e78111d70d54e7a (diff)
downloadvolse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.tar.gz
volse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.tar.bz2
volse-hubzilla-0523b4b2f1012a8b5f3bffb7f136a20dc9a4e43f.zip
Merge branch 'master' of https://github.com/redmatrix/hubzilla into contextual-help
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php44
1 files changed, 21 insertions, 23 deletions
diff --git a/include/nav.php b/include/nav.php
index d449718b8..1c40e0adb 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -8,11 +8,11 @@ function nav(&$a) {
*
*/
- if(!(x($a->page,'nav')))
- $a->page['nav'] = '';
+ if(!(x(App::$page,'nav')))
+ App::$page['nav'] = '';
$base = z_root();
- $a->page['htmlhead'] .= <<< EOT
+ App::$page['htmlhead'] .= <<< EOT
<script>$(document).ready(function() {
$("#nav-search-text").search_autocomplete('$base/acl');
@@ -24,8 +24,8 @@ EOT;
if(local_channel()) {
- $channel = $a->get_channel();
- $observer = $a->get_observer();
+ $channel = App::get_channel();
+ $observer = App::get_observer();
$prof = q("select id from profile where uid = %d and is_default = 1",
intval($channel['channel_id'])
);
@@ -35,12 +35,12 @@ EOT;
);
}
elseif(remote_channel())
- $observer = $a->get_observer();
+ $observer = App::get_observer();
$myident = (($channel) ? $channel['xchan_addr'] : '');
- $sitelocation = (($myident) ? $myident : $a->get_hostname());
+ $sitelocation = (($myident) ? $myident : App::get_hostname());
@@ -55,8 +55,8 @@ EOT;
if($banner === false)
$banner = get_config('system','sitename');
- $a->page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array(
- '$baseurl' => $a->get_baseurl(),
+ App::$page['header'] .= replace_macros(get_markup_template('hdr.tpl'), array(
+ '$baseurl' => z_root(),
'$sitelocation' => $sitelocation,
'$banner' => $banner
));
@@ -92,10 +92,8 @@ EOT;
$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'),'photos_nav_btn');
$nav['usermenu'][] = Array('cloud/' . $channel['channel_address'],t('Files'),"",t('Your files'),'cloud_nav_btn');
- require_once('include/chat.php');
- $has_chats = chatroom_list_count(local_channel());
if(! UNO)
- $nav['usermenu'][] = Array('chat/' . $channel['channel_address'] . (($has_chats) ? '' : '/new'), t('Chat'),"",t('Your chatrooms'),'chat_nav_btn');
+ $nav['usermenu'][] = Array('chat/' . $channel['channel_address'], t('Chat'),"",t('Your chatrooms'),'chat_nav_btn');
require_once('include/menu.php');
@@ -138,18 +136,18 @@ EOT;
$homelink = get_my_url();
if(! $homelink) {
- $observer = $a->get_observer();
+ $observer = App::get_observer();
$homelink = (($observer) ? $observer['xchan_url'] : '');
}
- if(($a->module != 'home') && (! (local_channel())))
+ if((App::$module != 'home') && (! (local_channel())))
$nav['home'] = array($homelink, t('Home'), "", t('Home Page'),'home_nav_btn');
- if(($a->config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_channel()))
+ if((App::$config['system']['register_policy'] == REGISTER_OPEN) && (! local_channel()) && (! remote_channel()))
$nav['register'] = array('register',t('Register'), "", t('Create an account'),'register_nav_btn');
- $help_url = z_root() . '/help?f=&cmd=' . $a->cmd;
+ $help_url = z_root() . '/help?f=&cmd=' . App::$cmd;
if(! get_config('system','hide_help')) {
require_once('mod/help.php');
@@ -242,25 +240,25 @@ EOT;
// turned off until somebody discovers this and figures out a good location for it.
$powered_by = '';
-// $powered_by = '<strong>red<img class="smiley" src="' . $a->get_baseurl() . '/images/rm-16.png" alt="r#" />matrix</strong>';
+// $powered_by = '<strong>red<img class="smiley" src="' . z_root() . '/images/rm-16.png" alt="r#" />matrix</strong>';
$tpl = get_markup_template('nav.tpl');
- $a->page['nav'] .= replace_macros($tpl, array(
- '$baseurl' => $a->get_baseurl(),
+ App::$page['nav'] .= replace_macros($tpl, array(
+ '$baseurl' => z_root(),
'$sitelocation' => $sitelocation,
'$nav' => $x['nav'],
'$banner' => $banner,
'$emptynotifications' => t('Loading...'),
'$userinfo' => $x['usermenu'],
'$localuser' => local_channel(),
- '$sel' => $a->nav_sel,
+ '$sel' => App::$nav_sel,
'$powered_by' => $powered_by,
'$help' => t('@name, #tag, ?doc, content'),
'$pleasewait' => t('Please wait...')
));
- call_hooks('page_header', $a->page['nav']);
+ call_hooks('page_header', App::$page['nav']);
}
/*
@@ -269,7 +267,7 @@ $powered_by = '';
*/
function nav_set_selected($item){
$a = get_app();
- $a->nav_sel = array(
+ App::$nav_sel = array(
'community' => null,
'network' => null,
'home' => null,
@@ -283,5 +281,5 @@ function nav_set_selected($item){
'manage' => null,
'register' => null,
);
- $a->nav_sel[$item] = 'active';
+ App::$nav_sel[$item] = 'active';
}