diff options
author | Evan Prodromou <evan@status.net> | 2009-10-21 22:41:42 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-10-21 22:41:42 -0400 |
commit | 4e639b8769f42e700b9ad3abe5564ddb0178501c (patch) | |
tree | f1ccb3017bf2ba0a79a4562cd36c2b61276a4a07 /lib/connectsettingsaction.php | |
parent | 0df85711d6b2b02f8857e9d1b51fda4183be8bf3 (diff) | |
parent | 5e536a66141fac332e77c5ea6e85aee6a9347ace (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/connectsettingsaction.php')
-rw-r--r-- | lib/connectsettingsaction.php | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/lib/connectsettingsaction.php b/lib/connectsettingsaction.php index 2095a7ceb..e5fb8727b 100644 --- a/lib/connectsettingsaction.php +++ b/lib/connectsettingsaction.php @@ -98,34 +98,37 @@ 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')); + } + + 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'); } + } + + |