]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/connectsettingsaction.php
Reorganized the OAuth app URLs and more work on the register app workflow
[quix0rs-gnu-social.git] / lib / connectsettingsaction.php
index 2095a7cebfed12373e654d037221a1b4a4ef2e61..b9c14799e03bb386eaeae1d95d2fe7e8afba2330 100644 (file)
@@ -98,34 +98,41 @@ class ConnectSettingsNav extends Widget
 
     function show()
     {
-        # action => array('prompt', 'title')
-        $menu = array();
-        if (common_config('xmpp', 'enabled')) {
-            $menu['imsettings'] =
-              array(_('IM'),
-                    _('Updates by instant messenger (IM)'));
-        }
-        if (common_config('sms', 'enabled')) {
-            $menu['smssettings'] =
-              array(_('SMS'),
-                    _('Updates by SMS'));
-        }
-        if (common_config('twitter', 'enabled')) {
-            $menu['twittersettings'] =
-              array(_('Twitter'),
-                    _('Twitter integration options'));
-        }
-
         $action_name = $this->action->trimmed('action');
         $this->action->elementStart('ul', array('class' => 'nav'));
 
-        foreach ($menu as $menuaction => $menudesc) {
-            $this->action->menuItem(common_local_url($menuaction),
-                                   $menudesc[0],
-                                   $menudesc[1],
-                                   $action_name === $menuaction);
+        if (Event::handle('StartConnectSettingsNav', array(&$this->action))) {
+
+            # action => array('prompt', 'title')
+            $menu = array();
+            if (common_config('xmpp', 'enabled')) {
+                $menu['imsettings'] =
+                  array(_('IM'),
+                        _('Updates by instant messenger (IM)'));
+            }
+            if (common_config('sms', 'enabled')) {
+                $menu['smssettings'] =
+                  array(_('SMS'),
+                        _('Updates by SMS'));
+            }
+            
+            $menu['oauthconnectionssettings'] = array(
+                _('Connections'),
+                _('Authorized connected applications')
+            );
+
+            foreach ($menu as $menuaction => $menudesc) {
+                $this->action->menuItem(common_local_url($menuaction),
+                        $menudesc[0],
+                        $menudesc[1],
+                        $action_name === $menuaction);
+            }
+
+            Event::handle('EndConnectSettingsNav', array(&$this->action));
         }
 
         $this->action->elementEnd('ul');
     }
+
 }
+