X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FBitlyUrl%2FBitlyUrlPlugin.php;h=3b6474dd86dd50b65d1a311039f1b546d3e61046;hb=4160a3fb730113f3d712bd777884c4b0482f6df1;hp=5efd573896c4f3fd807a17b6b4b25a549352bdf2;hpb=f79aec36feaa4760201a7e88d5b31513a3c458ba;p=quix0rs-gnu-social.git diff --git a/plugins/BitlyUrl/BitlyUrlPlugin.php b/plugins/BitlyUrl/BitlyUrlPlugin.php index 5efd573896..3b6474dd86 100644 --- a/plugins/BitlyUrl/BitlyUrlPlugin.php +++ b/plugins/BitlyUrl/BitlyUrlPlugin.php @@ -145,10 +145,10 @@ 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', 'rawdescription' => @@ -162,10 +162,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')); @@ -188,7 +188,7 @@ class BitlyUrlPlugin extends UrlShortenerPlugin /** * Add the bit.ly admin panel to the list... */ - function onEndAdminPanelNav($nav) + function onEndAdminPanelNav(Menu $nav) { if (AdminPanelAction::canAdmin('bitly')) { $action_name = $nav->action->trimmed('action'); @@ -205,27 +205,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.