summaryrefslogtreecommitdiff
path: root/actions/othersettings.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-17 08:04:14 -0500
committerEvan Prodromou <evan@status.net>2009-11-17 08:04:14 -0500
commitbac2d80c919a78d5cafd57f712872a90cda04847 (patch)
treed2df10a582edc0bf9e043f1c764953a290927678 /actions/othersettings.php
parent9a1a83e8ebe5ad39838e6363f1537a1a5232b9cb (diff)
parent6a1afda259c5223449f679a64f932e36df5ebe39 (diff)
Merge branch '0.9.x' into adminpanel
Conflicts: classes/User.php
Diffstat (limited to 'actions/othersettings.php')
-rw-r--r--actions/othersettings.php38
1 files changed, 19 insertions, 19 deletions
diff --git a/actions/othersettings.php b/actions/othersettings.php
index d32a2d651..0de7cd908 100644
--- a/actions/othersettings.php
+++ b/actions/othersettings.php
@@ -96,28 +96,28 @@ class OthersettingsAction extends AccountSettingsAction
common_local_url('othersettings')));
$this->elementStart('fieldset');
$this->hidden('token', common_session_token());
+ $this->elementStart('ul', 'form_data');
- $services=array();
- global $_shorteners;
- if($_shorteners){
- foreach($_shorteners as $name=>$value)
- {
- $services[$name]=$name;
- if(!empty($value['info']['freeService'])){
- // I18N
- $services[$name].=' (free service)';
- }
+ $shorteners = array();
+ Event::handle('GetUrlShorteners', array(&$shorteners));
+ $services = array();
+ foreach($shorteners as $name=>$value)
+ {
+ $services[$name]=$name;
+ if($value['freeService']){
+ $services[$name].=_(' (free service)');
}
}
- asort($services);
- $services['']='None';
-
- $this->elementStart('ul', 'form_data');
- $this->elementStart('li');
- $this->dropdown('urlshorteningservice', _('Shorten URLs with'),
- $services, _('Automatic shortening service to use.'),
- false, $user->urlshorteningservice);
- $this->elementEnd('li');
+ if($services)
+ {
+ asort($services);
+
+ $this->elementStart('li');
+ $this->dropdown('urlshorteningservice', _('Shorten URLs with'),
+ $services, _('Automatic shortening service to use.'),
+ false, $user->urlshorteningservice);
+ $this->elementEnd('li');
+ }
$this->elementStart('li');
$this->checkbox('viewdesigns', _('View profile designs'),
$user->viewdesigns, _('Show or hide profile designs.'));