X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fothersettings.php;h=10e9873b390b16f6cbc7e0d849a0c6d770a9814a;hb=b2e8d8407cc7f1abb5e8767cd3403ac356775eaa;hp=011b4fc83832e7c39de789855ea44067318a871f;hpb=fe7848e8b87b6a3f44fc8b7a58f79812d197dec2;p=quix0rs-gnu-social.git diff --git a/actions/othersettings.php b/actions/othersettings.php index 011b4fc838..10e9873b39 100644 --- a/actions/othersettings.php +++ b/actions/othersettings.php @@ -57,7 +57,7 @@ class OthersettingsAction extends AccountSettingsAction function title() { - return _('Other Settings'); + return _('Other settings'); } /** @@ -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($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.'));