summaryrefslogtreecommitdiff
path: root/actions/othersettings.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-11-11 17:05:24 -0500
committerCraig Andrews <candrews@integralblue.com>2009-11-11 17:05:24 -0500
commit23290f746f7ef9567e95ecbb06baf17f246a3fe7 (patch)
tree488a9da0ae7e4cf16e665059ed174695629f6e07 /actions/othersettings.php
parent1c4bacf7bcaad9b078ff1e7675371932bb76d0b3 (diff)
Do not show the URL shortener selection drop down if no shorteners are available
Diffstat (limited to 'actions/othersettings.php')
-rw-r--r--actions/othersettings.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/actions/othersettings.php b/actions/othersettings.php
index d52a634ac..1d252f34e 100644
--- a/actions/othersettings.php
+++ b/actions/othersettings.php
@@ -96,6 +96,7 @@ class OthersettingsAction extends AccountSettingsAction
common_local_url('othersettings')));
$this->elementStart('fieldset');
$this->hidden('token', common_session_token());
+ $this->elementStart('ul', 'form_data');
Event::handle('GetUrlShorteners', array(&$shorteners));
foreach($shorteners as $name=>$value)
@@ -105,14 +106,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.'));