X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fplugin.php;h=59bf3ba9d695914c6544dd76dade659e97bd2dad;hb=9f15febf88769493aa834cab5b916cb46298842a;hp=437cf03a1a1775aa973fc3694834c0c65af1c125;hpb=c8b8f07af14ad2ce9d0c0267962dd3bbf6473a4b;p=quix0rs-gnu-social.git diff --git a/lib/plugin.php b/lib/plugin.php index 437cf03a1a..59bf3ba9d6 100644 --- a/lib/plugin.php +++ b/lib/plugin.php @@ -21,13 +21,13 @@ * * @category Plugin * @package StatusNet - * @author Evan Prodromou + * @author Evan Prodromou * @copyright 2008 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); } @@ -46,9 +46,9 @@ if (!defined('LACONICA')) { * * @category Plugin * @package StatusNet - * @author Evan Prodromou + * @author Evan Prodromou * @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/ * * @see Event */ @@ -76,4 +76,18 @@ class Plugin { return true; } + + /* + * the name of the shortener + * shortenerInfo associative array with additional information. One possible element is 'freeService' which can be true or false + * shortener array, first element is the name of the class, second element is an array to be passed as constructor parameters to the class + */ + function registerUrlShortener($name, $shortenerInfo, $shortener) + { + global $_shorteners; + if(!is_array($_shorteners)){ + $_shorteners=array(); + } + $_shorteners[$name]=array('info'=>$shortenerInfo, 'callInfo'=>$shortener); + } }