]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/EmailReminder/EmailReminderPlugin.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / EmailReminder / EmailReminderPlugin.php
index 72583f53492a574e51b308cb06df980304cf07ca..9ba3d125e11b0281279ab3a83d2fdffb7c34e27c 100644 (file)
@@ -61,32 +61,6 @@ class EmailReminderPlugin extends Plugin
         return true;
     }
 
-    /**
-     * Load related modules when needed
-     *
-     * @param string $cls Name of the class to be loaded
-     *
-     * @return boolean hook value; true means continue processing, false
-     *         means stop.
-     */
-    function onAutoload($cls) {
-        $base = dirname(__FILE__);
-        $lower = strtolower($cls);
-
-        $files = array("$base/classes/$cls.php",
-            "$base/lib/$lower.php");
-        if (substr($lower, -6) == 'action') {
-            $files[] = "$base/actions/" . substr($lower, 0, -6) . ".php";
-        }
-        foreach ($files as $file) {
-            if (file_exists($file)) {
-                include_once $file;
-                return false;
-            }
-        }
-        return true;
-    }
-
     /**
      * Register our queue handlers
      *
@@ -94,7 +68,7 @@ class EmailReminderPlugin extends Plugin
      *
      * @return boolean hook value
      */
-    function onEndInitializeQueueManager($qm)
+    function onEndInitializeQueueManager(QueueManager $qm)
     {
         $qm->connect('siterem', 'SiteConfirmReminderHandler');
         $qm->connect('uregrem', 'UserConfirmRegReminderHandler');
@@ -103,7 +77,7 @@ class EmailReminderPlugin extends Plugin
         return true;
     }
 
-    function onEndDocFileForTitle($title, $paths, &$filename)
+    function onEndDocFileForTitle($title, array $paths, &$filename)
     {
         if (empty($filename)) {
             $filename = dirname(__FILE__) . '/mail-src/' . $title;
@@ -153,6 +127,7 @@ class EmailReminderPlugin extends Plugin
      * Send a real live email reminder
      *
      * @todo This would probably be better as two or more sep functions
+     * @todo Add language support?
      *
      * @param string $type      type of reminder
      * @param mixed  $object    Confirm_address or Invitation object
@@ -168,7 +143,7 @@ class EmailReminderPlugin extends Plugin
         $inviterurl = null;
 
         if ($type == UserInviteReminderHandler::INVITE_REMINDER) {
-            $user = User::staticGet($object->user_id);
+            $user = User::getKV($object->user_id);
             if (!empty($user)) {
                 $profile    = $user->getProfile();
                 $inviter    = $profile->getBestName();
@@ -205,11 +180,11 @@ class EmailReminderPlugin extends Plugin
      * @param type $versions
      * @return type
      */
-    function onPluginVersion(&$versions)
+    function onPluginVersion(array &$versions)
     {
         $versions[] = array(
             'name'           => 'EmailReminder',
-            'version'        => STATUSNET_VERSION,
+            'version'        => GNUSOCIAL_VERSION,
             'author'         => 'Zach Copley',
             'homepage'       => 'http://status.net/wiki/Plugin:EmailReminder',
             // TRANS: Plugin description.