From 7d77bdcc483a223eaa4eef152f6d060c2465499c Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 1 Mar 2011 06:30:51 -0500 Subject: [PATCH] move top-level navigation to default local navigation --- lib/action.php | 3 ++- lib/primarynav.php | 23 +---------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/lib/action.php b/lib/action.php index 54bea7c931..9a6a160e3f 100644 --- a/lib/action.php +++ b/lib/action.php @@ -637,7 +637,8 @@ class Action extends HTMLOutputter // lawsuit */ function showLocalNav() { - // does nothing by default + $nav = new DefaultLocalNav($this); + $nav->show(); } /** diff --git a/lib/primarynav.php b/lib/primarynav.php index 01517d9429..296328d8bd 100644 --- a/lib/primarynav.php +++ b/lib/primarynav.php @@ -54,23 +54,6 @@ class PrimaryNav extends Menu 'id' => 'site_nav_global_primary')); if (Event::handle('StartPrimaryNav', array($this->action))) { if (!empty($user)) { - $this->action->menuItem(common_local_url('all', - array('nickname' => $user->nickname)), - _m('Home'), - _m('Friends timeline'), - false, - 'nav_home'); - $this->action->menuItem(common_local_url('showstream', - array('nickname' => $user->nickname)), - _m('Profile'), - _m('Your profile'), - false, - 'nav_profile'); - $this->action->menuItem(common_local_url('public'), - _m('Public'), - _m('Everyone on this site'), - false, - 'nav_public'); $this->action->menuItem(common_local_url('profilesettings'), _m('Settings'), _m('Change your personal settings'), @@ -89,11 +72,6 @@ class PrimaryNav extends Menu false, 'nav_logout'); } else { - $this->action->menuItem(common_local_url('public'), - _m('Public'), - _m('Everyone on this site'), - false, - 'nav_public'); $this->action->menuItem(common_local_url('login'), _m('Login'), _m('Login to the site'), @@ -111,6 +89,7 @@ class PrimaryNav extends Menu Event::handle('EndPrimaryNav', array($this->action)); } + $this->action->elementEnd('ul'); } } -- 2.39.5