X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FEmailReminder%2FEmailReminderPlugin.php;h=51950542b2b93a0487f089c3e02936048616f4f3;hb=734287cfd37b9833a2d0fdf93c25934c2cae9e53;hp=815537c659f18e4051923f1b122876caca6f89c6;hpb=6943f00e37216bb243fe7dcb7370ae4c81e704c1;p=quix0rs-gnu-social.git diff --git a/plugins/EmailReminder/EmailReminderPlugin.php b/plugins/EmailReminder/EmailReminderPlugin.php index 815537c659..51950542b2 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 * @@ -135,6 +109,11 @@ class EmailReminderPlugin extends Plugin if (self::sendReminderEmail($type, $object, $subject, $title)) { try { Email_reminder::recordReminder($type, $object, $day); + common_log( + LOG_INFO, + "Sent {$type} reminder to {$object->address}.", + __FILE__ + ); } catch (Exception $e) { // oh noez common_log(LOG_ERR, $e->getMessage(), __FILE__); @@ -163,7 +142,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(); @@ -204,7 +183,7 @@ class EmailReminderPlugin extends Plugin { $versions[] = array( 'name' => 'EmailReminder', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Zach Copley', 'homepage' => 'http://status.net/wiki/Plugin:EmailReminder', // TRANS: Plugin description.