]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/SlicedFavorites/SlicedFavoritesPlugin.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / SlicedFavorites / SlicedFavoritesPlugin.php
index 75b9847f44de55b4e81109c7e17a866dcacabce5..e8435fa05a4c423b3ab17ea22dfc60557796a876 100644 (file)
@@ -52,10 +52,10 @@ class SlicedFavoritesPlugin extends Plugin
     /**
      * 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('favorited/:slice',
                     array('action' => 'favoritedslice'),
@@ -65,7 +65,7 @@ class SlicedFavoritesPlugin extends Plugin
     }
 
     // Take over the default... :D
-    function onArgsInitialize($args)
+    function onArgsInitialize(array &$args)
     {
         if (array_key_exists('action', $args)) {
             $action = trim($args['action']);
@@ -77,27 +77,6 @@ class SlicedFavoritesPlugin extends Plugin
         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 'favoritedsliceaction':
-            require_once "$base/$lower.php";
-            return false;
-        default:
-            return true;
-        }
-    }
-
     function onSlicedFavoritesGetSettings($slice, &$data)
     {
         if (isset($this->slices[$slice])) {
@@ -115,22 +94,19 @@ class SlicedFavoritesPlugin extends Plugin
      * @param array &$versions array of version data arrays; see EVENTS.txt
      *
      * @return boolean hook value
-     * @todo Needs a proper plugin description.
      */
-/*
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $url = 'http://status.net/wiki/Plugin:SlicedFavorites';
 
         $versions[] = array('name' => 'SlicedFavorites',
-            'version' => STATUSNET_VERSION,
+            'version' => GNUSOCIAL_VERSION,
             'author' => 'Brion Vibber',
             'homepage' => $url,
             'rawdescription' =>
             // TRANS: Plugin description.
-            _m('Needs a proper plugin description.'));
+            _m('Shows timelines of popular notices for defined subsets of users.'));
 
         return true;
     }
-*/
 }