]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/ClientSideShorten/shorten.php
Merge remote-tracking branch 'gitorious/1.0.x' into 1.0.x
[quix0rs-gnu-social.git] / plugins / ClientSideShorten / shorten.php
index f67cbf3b28a3489be488936f366e8468ef991482..6840d532aab720d4d21d2bdbf47431d9ccc3383f 100644 (file)
@@ -41,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;
@@ -53,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');
@@ -66,4 +66,3 @@ class ShortenAction extends Action
         print $shortened_text;
     }
 }
-