aboutsummaryrefslogtreecommitdiffstats
path: root/include/nav.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/nav.php')
-rw-r--r--include/nav.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/nav.php b/include/nav.php
index c2c87232b..65d5a3ef6 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -19,6 +19,8 @@ function nav($template = 'default') {
App::$page['htmlhead'] .= '<script>$(document).ready(function() { $("#nav-search-text").search_autocomplete(\'' . z_root() . '/acl' . '\');});</script>';
$is_owner = (((local_channel()) && ((App::$profile_uid == local_channel()) || (App::$profile_uid == 0))) ? true : false);
$observer = App::get_observer();
+ $chans = [];
+
if (local_channel()) {
$channel = App::get_channel();
@@ -35,7 +37,7 @@ function nav($template = 'default') {
$sitelocation = (($is_owner) ? '' : App::$profile['reddress']);
}
else {
- $sitelocation = ((App::$profile['reddress']) ? App::$profile['reddress'] : '@' . App::get_hostname());
+ $sitelocation = ((isset(App::$profile['reddress'])) ? App::$profile['reddress'] : '@' . App::get_hostname());
}
require_once('include/conversation.php');
@@ -336,8 +338,8 @@ function nav($template = 'default') {
'$featured_apps' => t('Featured Apps'),
'$url' => (($url) ? $url : z_root() . '/' . App::$cmd),
'$settings_url' => $settings_url,
- '$name' => ((!$is_owner) ? App::$profile['fullname'] : ''),
- '$thumb' => ((!$is_owner) ? App::$profile['thumb'] : ''),
+ '$name' => ((!$is_owner && isset(App::$profile['fullname'])) ? App::$profile['fullname'] : ''),
+ '$thumb' => ((!$is_owner && isset(App::$profile['thumb'])) ? App::$profile['thumb'] : ''),
'$form_security_token' => get_form_security_token('pconfig')
]);
@@ -414,9 +416,6 @@ function channel_apps($is_owner = false, $nickname = null) {
$has_webpages = (($r) ? true : false);
- if (x($_GET, 'tab'))
- $tab = notags(trim($_GET['tab']));
-
$url = z_root() . '/channel/' . $nickname;
$pr = z_root() . '/profile/' . $nickname;
@@ -522,7 +521,7 @@ function channel_apps($is_owner = false, $nickname = null) {
];
}
- $arr = ['is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs];
+ $arr = ['is_owner' => $is_owner, 'nickname' => $nickname, 'tabs' => $tabs];
call_hooks('channel_apps', $arr);