X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fothersettings.php;h=011b4fc83832e7c39de789855ea44067318a871f;hb=affe00276a008038e8a8b37b3812215e382fe98e;hp=1277f80527f2c3e94c52e59c6176973bc3868fb0;hpb=e6c54a59e140c9ee3b6244dbcb92f9ca9d065887;p=quix0rs-gnu-social.git diff --git a/actions/othersettings.php b/actions/othersettings.php index 1277f80527..011b4fc838 100644 --- a/actions/othersettings.php +++ b/actions/othersettings.php @@ -1,6 +1,6 @@ . * * @category Settings - * @package Laconica - * @author Robin Millette - * @author Evan Prodromou - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Robin Millette + * @author Evan Prodromou + * @copyright 2008-2009 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -40,11 +40,11 @@ require_once INSTALLDIR.'/lib/accountsettingsaction.php'; * Currently this just manages URL shortening. * * @category Settings - * @package Laconica - * @author Robin Millette - * @author Zach Copley + * @package StatusNet + * @author Robin Millette + * @author Zach Copley * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ class OthersettingsAction extends AccountSettingsAction @@ -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');