X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FPtitUrl%2FPtitUrlPlugin.php;h=3a3e767e43df2f58805eb4124a8cdc8a0818a876;hb=546a03b5eac5f172d543a889625e2f4de446e8b7;hp=cdf46846ba43cbe981e5b5bb91209d9788602bd0;hpb=14adb7cc41e3d5d4e543c1f13f7a60d3cadb5c71;p=quix0rs-gnu-social.git diff --git a/plugins/PtitUrl/PtitUrlPlugin.php b/plugins/PtitUrl/PtitUrlPlugin.php index cdf46846ba..3a3e767e43 100644 --- a/plugins/PtitUrl/PtitUrlPlugin.php +++ b/plugins/PtitUrl/PtitUrlPlugin.php @@ -22,7 +22,7 @@ * @category Plugin * @package StatusNet * @author Craig Andrews - * @copyright 2009 Craig Andrews http://candrews.integralblue.com + * @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/ */ @@ -38,7 +38,8 @@ class PtitUrlPlugin extends UrlShortenerPlugin function onInitializePlugin(){ parent::onInitializePlugin(); if(!isset($this->serviceUrl)){ - throw new Exception("must specify a serviceUrl"); + // TRANS: Exception thrown when URL shortening plugin was configured incorrectly. + throw new Exception(_m('You must specify a serviceUrl for ptit URL shortening.')); } } @@ -50,23 +51,24 @@ class PtitUrlPlugin extends UrlShortenerPlugin @$dom->loadHTML($response); $y = @simplexml_import_dom($dom); if (!isset($y->body)) return; + // @TODO Super-ugly style??? $xml = $y->body->center->table->tr->td->pre->a->attributes(); if (isset($xml['href'])) { return strval($xml['href']); } } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => sprintf('PtitUrl (%s)', $this->shortenerName), - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:PtitUrl', 'rawdescription' => + // TRANS: Plugin description. %1$s is the URL shortening service base URL (for example "bit.ly"). sprintf(_m('Uses %1$s URL-shortener service.'), $this->shortenerName)); return true; } } -