]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/othersettings.php
YammerImporter: 'group_id' field not always present in message data; avoid notice...
[quix0rs-gnu-social.git] / actions / othersettings.php
index d52a634aca37b606a14f5f95b83d37e93457e3fb..10e9873b390b16f6cbc7e0d849a0c6d770a9814a 100644 (file)
@@ -57,7 +57,7 @@ class OthersettingsAction extends AccountSettingsAction
 
     function title()
     {
-        return _('Other Settings');
+        return _('Other settings');
     }
 
     /**
@@ -96,8 +96,11 @@ class OthersettingsAction extends AccountSettingsAction
                                           common_local_url('othersettings')));
         $this->elementStart('fieldset');
         $this->hidden('token', common_session_token());
+        $this->elementStart('ul', 'form_data');
 
+        $shorteners = array();
         Event::handle('GetUrlShorteners', array(&$shorteners));
+        $services = array();
         foreach($shorteners as $name=>$value)
         {
             $services[$name]=$name;
@@ -105,14 +108,16 @@ class OthersettingsAction extends AccountSettingsAction
                 $services[$name].=_(' (free service)');
             }
         }
-        asort($services);
+        if($services)
+        {
+            asort($services);
 
-        $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');
+            $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.'));