summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-09-03 14:58:50 -0400
committerCraig Andrews <candrews@integralblue.com>2009-09-03 14:58:50 -0400
commitbeae3db41375879e725af053edf8041bbd76ac8c (patch)
tree6460b3b09f8d008e3be9e5fede3a5ba0511cadac /actions
parent5db43f465543a24facc299be5d7301d9dd6b019e (diff)
Pluginize the URL shorteners
Diffstat (limited to 'actions')
-rw-r--r--actions/othersettings.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/actions/othersettings.php b/actions/othersettings.php
index 8b674161a..4ccef8412 100644
--- a/actions/othersettings.php
+++ b/actions/othersettings.php
@@ -91,19 +91,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');