X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FClientSideShorten%2Fshorten.php;h=6840d532aab720d4d21d2bdbf47431d9ccc3383f;hb=7b0ab409c905a85e7d27a16e98ff430a8540781c;hp=07c19e2e7c32aa56269bfd191e06f52fe5ac7a8c;hpb=065ecc5573607d21ae005ff2649d04558256fc7e;p=quix0rs-gnu-social.git diff --git a/plugins/ClientSideShorten/shorten.php b/plugins/ClientSideShorten/shorten.php index 07c19e2e7c..6840d532aa 100644 --- a/plugins/ClientSideShorten/shorten.php +++ b/plugins/ClientSideShorten/shorten.php @@ -23,6 +23,7 @@ * @package StatusNet * @author Craig Andrews * @copyright 2008-2009 StatusNet, Inc. + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -40,7 +41,6 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ - class ShortenAction extends Action { private $text; @@ -52,12 +52,13 @@ class ShortenAction extends Action $this->users=array(); $this->text = $this->arg('text'); if(is_null($this->text)){ - throw new ClientException(_m('\'text\' argument must be specified.')); + // TRANS: Client exception thrown when a text argument is not present. + throw new ClientException(_m('"text" argument must be specified.')); } return true; } - function handle($args) + function handle($args=null) { parent::handle($args); header('Content-Type: text/plain'); @@ -65,4 +66,3 @@ class ShortenAction extends Action print $shortened_text; } } -