X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBitlyUrl%2FBitlyUrlPlugin.php;h=d3c1ac12188892046f12f9cf68b369c5bf1d47c4;hb=2b43d484ebcf63471629a396546dc363d5faa278;hp=5efd573896c4f3fd807a17b6b4b25a549352bdf2;hpb=8c710ad2c1b80544acccb515f7b601aadff2de16;p=quix0rs-gnu-social.git diff --git a/plugins/BitlyUrl/BitlyUrlPlugin.php b/plugins/BitlyUrl/BitlyUrlPlugin.php index 5efd573896..d3c1ac1218 100644 --- a/plugins/BitlyUrl/BitlyUrlPlugin.php +++ b/plugins/BitlyUrl/BitlyUrlPlugin.php @@ -111,7 +111,6 @@ class BitlyUrlPlugin extends UrlShortenerPlugin */ protected function query($url) { - // http://code.google.com/p/bitly-api/wiki/ApiDocumentation#/shorten $params = http_build_query(array( 'login' => $this->getLogin(), 'apiKey' => $this->getApiKey()), '', '&'); @@ -145,12 +144,12 @@ class BitlyUrlPlugin extends UrlShortenerPlugin return null; } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => sprintf('BitlyUrl (%s)', $this->shortenerName), - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews, Brion Vibber', - 'homepage' => 'http://status.net/wiki/Plugin:BitlyUrl', + 'homepage' => 'https://git.gnu.io/gnu/gnu-social/tree/master/plugins/BitlyUrl', '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.'), @@ -162,10 +161,10 @@ class BitlyUrlPlugin extends UrlShortenerPlugin /** * Hook for RouterInitialized event. * - * @param Net_URL_Mapper $m path-to-action mapper + * @param URLMapper $m path-to-action mapper * @return boolean hook return */ - function onRouterInitialized($m) + public function onRouterInitialized(URLMapper $m) { $m->connect('panel/bitly', array('action' => 'bitlyadminpanel')); @@ -205,27 +204,6 @@ class BitlyUrlPlugin extends UrlShortenerPlugin return true; } - /** - * Automatically load the actions and libraries used by the plugin - * - * @param Class $cls the class - * - * @return boolean hook return - * - */ - function onAutoload($cls) - { - $base = dirname(__FILE__); - $lower = strtolower($cls); - switch ($lower) { - case 'bitlyadminpanelaction': - require_once "$base/$lower.php"; - return false; - default: - return true; - } - } - /** * Internal hook point to check the default global credentials so * the admin form knows if we have a fallback or not.