]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Nav.php
Fix undefined offset notices in Protocol\Email
[friendica.git] / src / Content / Nav.php
index 8289825eade47587a67017f7bcee64be49542134..81985ed5ba5a612ff030f47289e9344565a85884 100644 (file)
@@ -9,14 +9,12 @@ use Friendica\Content\Feature;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
 use Friendica\Core\L10n;
+use Friendica\Core\Renderer;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
 use Friendica\Model\Contact;
 use Friendica\Model\Profile;
 
-require_once 'boot.php';
-require_once 'include/text.php';
-
 class Nav
 {
        private static $selected = [
@@ -57,13 +55,13 @@ class Nav
        public static function build(App $a)
        {
                // Placeholder div for popup panel
-               $nav = '<div id="panel" style="display: none;"></div>' ;
+               $nav = '<div id="panel" style="display: none;"></div>';
 
                $nav_info = self::getInfo($a);
 
-               $tpl = get_markup_template('nav.tpl');
+               $tpl = Renderer::getMarkupTemplate('nav.tpl');
 
-               $nav .= replace_macros($tpl, [
+               $nav .= Renderer::replaceMacros($tpl, [
                        '$baseurl'      => System::baseUrl(),
                        '$sitelocation' => $nav_info['sitelocation'],
                        '$nav'          => $nav_info['nav'],
@@ -169,7 +167,7 @@ class Nav
                // "Home" should also take you home from an authenticated remote profile connection
                $homelink = Profile::getMyURL();
                if (! $homelink) {
-                       $homelink = ((x($_SESSION, 'visitor_home')) ? $_SESSION['visitor_home'] : '');
+                       $homelink = defaults($_SESSION, 'visitor_home', '');
                }
 
                if (($a->module != 'home') && (! (local_user()))) {
@@ -233,7 +231,7 @@ class Nav
                // The following nav links are only show to logged in users
                if (local_user()) {
                        $nav['network'] = ['network', L10n::t('Network'), '', L10n::t('Conversations from your friends')];
-                       $nav['net_reset'] = ['network/0?f=&order=comment&nets=all', L10n::t('Network Reset'), '', L10n::t('Load Network page with no filters')];
+                       $nav['net_reset'] = ['network/?f=', L10n::t('Network Reset'), '', L10n::t('Load Network page with no filters')];
 
                        $nav['home'] = ['profile/' . $a->user['nickname'], L10n::t('Home'), '', L10n::t('Your posts and conversations')];