X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnav.php;h=7a8230cc15da8f4bc6b9f6a6c7d0cb9479b82c0b;hb=d49325d177cf03b97df250ca3cb081421c541049;hp=a55629a5a09f0995c8115fedb4ff7f4fd7e2ae49;hpb=4b0e76f3b7bcd28594464fe20f9a3f06ffcc1377;p=friendica.git
diff --git a/include/nav.php b/include/nav.php
index a55629a5a0..7a8230cc15 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -43,8 +43,17 @@ function nav(&$a) {
call_hooks('page_header', $a->page['nav']);
}
-
-function nav_info(&$a)
+/**
+ * @brief Prepares a list of navigation links
+ *
+ * @param App $a
+ * @return array Navigation links
+ * string 'sitelocation' => The webbie (username@site.com)
+ * array 'nav' => Array of links used in the nav menu
+ * string 'banner' => Formatted html link with banner image
+ * array 'userinfo' => Array of user information (name, icon)
+ */
+function nav_info(App $a)
{
$ssl_state = ((local_user()) ? true : false);
@@ -56,7 +65,7 @@ function nav_info(&$a)
$myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
- $sitelocation = $myident . substr($a->get_baseurl($ssl_state),strpos($a->get_baseurl($ssl_state),'//') + 2 );
+ $sitelocation = $myident . substr($a->get_baseurl($ssl_state), strpos($a->get_baseurl($ssl_state), '//') + 2 );
// nav links: array of array('href', 'text', 'extra css classes', 'title')
$nav = array();
@@ -86,7 +95,7 @@ function nav_info(&$a)
$nav['login'] = array('login', t('Login'), ($a->module == 'login' ? 'selected' : ''), t('Sign in'));
}
- // "Home" should also take you home from an authenticated remote profile connection
+ // "Home" should also take you home from an authenticated remote profile connection
$homelink = get_my_url();
if (! $homelink) {
$homelink = ((x($_SESSION,'visitor_home')) ? $_SESSION['visitor_home'] : '');
@@ -183,6 +192,7 @@ function nav_info(&$a)
$nav['contacts'] = array('contacts', t('Contacts'), '', t('Manage/edit friends and contacts'));
}
+ // Show the link to the admin configuration page if user is admin
if (is_site_admin()) {
$nav['admin'] = array('admin/', t('Admin'), '', t('Site setup and configuration'));
}
@@ -192,7 +202,7 @@ function nav_info(&$a)
// Provide a banner/logo/whatever
$banner = get_config('system', 'banner');
if ($banner === false) {
- $banner .= '
Friendica';
+ $banner = '
Friendica';
}
call_hooks('nav_info', $nav);
@@ -205,7 +215,6 @@ function nav_info(&$a)
);
}
-
/**
* Set a menu item in navbar as selected
*