diff options
Diffstat (limited to 'include/nav.php')
-rw-r--r-- | include/nav.php | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/include/nav.php b/include/nav.php index a443c58ff..41358c93e 100644 --- a/include/nav.php +++ b/include/nav.php @@ -17,15 +17,7 @@ function nav($template = 'default') { if(!(x(App::$page,'nav'))) App::$page['nav'] = ''; - $base = z_root(); - - App::$page['htmlhead'] .= <<< EOT -<script>$(document).ready(function() { - $("#nav-search-text").search_autocomplete('$base/acl'); -}); - -</script> -EOT; + 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); @@ -99,8 +91,10 @@ EOT; if(local_channel()) { if(! $_SESSION['delegate']) { - $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage Your Channels'),'manage_nav_btn'); + $nav['manage'] = array('manage', t('Channel Manager'), "", t('Manage your channels'),'manage_nav_btn'); } + if(feature_enabled(local_channel(),'groups')) + $nav['group'] = array('group', t('Privacy Groups'),"", t('Manage your privacy groups'),'group_nav_btn'); $nav['settings'] = array('settings', t('Settings'),"", t('Account/Channel Settings'),'settings_nav_btn'); @@ -176,21 +170,19 @@ EOT; $nav['help'] = [$help_url, t('Help'), "", t('Help and documentation'), 'help_nav_btn', $context_help, $enable_context_help]; } - $nav['search'] = ['search', t('Search'), "", t('Search site @name, !forum, #tag, ?docs, content')]; - + switch(App::$module) { + case 'network': + $search_form_action = 'network'; + break; + case 'channel': + $search_form_action = 'channel'; + break; + default: + $search_form_action = 'search'; + } - /** - * - * The following nav links are only show to logged in users - * - */ - if(local_channel()) { - 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['search'] = ['search', t('Search'), "", t('Search site @name, !forum, #tag, ?docs, content'), $search_form_action]; /** * Admin page @@ -220,9 +212,9 @@ EOT; //app bin if($is_owner) { - if(get_pconfig(local_channel(), 'system','initial_import_system_apps') === false) { + if(get_pconfig(local_channel(), 'system','import_system_apps') !== datetime_convert('UTC','UTC','now','Y-m-d')) { Zlib\Apps::import_system_apps(); - set_pconfig(local_channel(), 'system','initial_import_system_apps', 1); + set_pconfig(local_channel(), 'system','import_system_apps', datetime_convert('UTC','UTC','now','Y-m-d')); } $syslist = array(); |