summaryrefslogtreecommitdiff
path: root/actions/othersettings.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-15 17:16:35 -0400
committerEvan Prodromou <evan@status.net>2009-09-15 17:16:35 -0400
commit13147143fc830e81b80ae86bf4cc4f745ce04381 (patch)
tree7197e7c3437e028a1bc2358f38ac3964cf3fe6e9 /actions/othersettings.php
parente559f82e86c495abdc4cf5fff3d8c6279a808354 (diff)
parent4081ed79b02fd06f7c347803478e1f835311c2ab (diff)
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/othersettings.php')
-rw-r--r--actions/othersettings.php33
1 files changed, 20 insertions, 13 deletions
diff --git a/actions/othersettings.php b/actions/othersettings.php
index 8b674161a..011b4fc83 100644
--- a/actions/othersettings.php
+++ b/actions/othersettings.php
@@ -71,6 +71,12 @@ class OthersettingsAction extends AccountSettingsAction
return _('Manage various other options.');
}
+ function showScripts()
+ {
+ parent::showScripts();
+ $this->autofocus('urlshorteningservice');
+ }
+
/**
* Content area of the page
*
@@ -91,19 +97,20 @@ class OthersettingsAction extends AccountSettingsAction
$this->elementStart('fieldset');
$this->hidden('token', common_session_token());
- // I18N
-
- $services = array(
- '' => 'None',
- 'ur1.ca' => 'ur1.ca (free service)',
- '2tu.us' => '2tu.us (free service)',
- 'ptiturl.com' => 'ptiturl.com',
- 'bit.ly' => 'bit.ly',
- 'tinyurl.com' => 'tinyurl.com',
- 'is.gd' => 'is.gd',
- 'snipr.com' => 'snipr.com',
- 'metamark.net' => 'metamark.net'
- );
+ $services=array();
+ global $_shorteners;
+ if($_shorteners){
+ foreach($_shorteners as $name=>$value)
+ {
+ $services[$name]=$name;
+ if($value['info']['freeService']){
+ // I18N
+ $services[$name].=' (free service)';
+ }
+ }
+ }
+ asort($services);
+ $services['']='None';
$this->elementStart('ul', 'form_data');
$this->elementStart('li');