X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FEmailReminder%2FEmailReminderPlugin.php;h=9ba3d125e11b0281279ab3a83d2fdffb7c34e27c;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=72583f53492a574e51b308cb06df980304cf07ca;hpb=cb183359e23ae7a5cfb483fa06c6c4b7a8b05fff;p=quix0rs-gnu-social.git diff --git a/plugins/EmailReminder/EmailReminderPlugin.php b/plugins/EmailReminder/EmailReminderPlugin.php index 72583f5349..9ba3d125e1 100644 --- a/plugins/EmailReminder/EmailReminderPlugin.php +++ b/plugins/EmailReminder/EmailReminderPlugin.php @@ -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.