]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/settingsnav.php
Avoid having to check for notices without rendered copies in upgrade.php
[quix0rs-gnu-social.git] / lib / settingsnav.php
index f403d4bdcdb0c3d386f607783a6deb2919674fef..504b66fc6f4d75316313664029f4fd42f888412a 100644 (file)
@@ -59,24 +59,9 @@ class SettingsNav extends Menu
         $nickname = $user->nickname;
         $name = $user->getProfile()->getBestName();
 
-        // Stub section w/ home link
-        $this->action->elementStart('ul');
-        $this->action->elementStart('li');
-        // TRANS: Header in settings navigation panel.
-        $this->action->element('h3', null, _m('HEADER','Home'));
-        $this->action->elementStart('ul', 'nav');
-        $this->out->menuItem(common_local_url('all', array('nickname' =>
-                                                           $nickname)),
-                             // TRANS: Menu item in settings navigation panel.
-                             _m('MENU','Home'),
-                             // TRANS: Menu item title in settings navigation panel.
-                             // TRANS: %s is a username.
-                             sprintf(_('%s and friends'), $name),
-                             $this->action == 'all', 'nav_timeline_personal');
-        $this->action->elementEnd('ul');
-        $this->action->elementEnd('li');
-        $this->action->elementEnd('ul');
-
+        $stub = new HomeStubNav($this->action);
+        $this->submenu(_m('MENU','Home'), $stub);
+        
         $this->action->elementStart('ul');
         $this->action->elementStart('li');
         // TRANS: Header in settings navigation panel.
@@ -121,7 +106,11 @@ class SettingsNav extends Menu
 
             Event::handle('EndAccountSettingsNav', array(&$this->action));
 
-            if (common_config('xmpp', 'enabled')) {
+            $haveImPlugin = false;
+
+            Event::handle('HaveImPlugin', array(&$haveImPlugin));
+
+            if ($haveImPlugin) {
                 $this->action->menuItem(common_local_url('imsettings'),
                                         // TRANS: Menu item in settings navigation panel.
                                         _m('MENU','IM'),
@@ -146,6 +135,15 @@ class SettingsNav extends Menu
                                     _('Authorized connected applications'),
                                     $actionName == 'oauthconnectionsettings');
 
+            if (common_config('oldschool', 'enabled')) {
+                $this->action->menuItem(common_local_url('oldschoolsettings'),
+                                        // TRANS: Menu item in settings navigation panel.
+                                        _m('MENU','Old school'),
+                                        // TRANS: Menu item title in settings navigation panel.
+                                        _('UI tweaks for old-school users'),
+                                        $actionName == 'oldschoolsettings');
+            }
+
             Event::handle('EndConnectSettingsNav', array(&$this->action));
         }