summaryrefslogtreecommitdiff
path: root/forum
diff options
context:
space:
mode:
authordeva <deva>2008-12-07 14:48:58 +0000
committerdeva <deva>2008-12-07 14:48:58 +0000
commiteb2fbadbdfd52d98fd20bcb1905d33bd7a3fd49e (patch)
tree141f9fe8a10db81c39f2110dbe3d5a71d781d58f /forum
parentacdf23fd17be67d0b20eac89cd4d88669885f1d7 (diff)
Made notify resend after a configurable timeout.
Diffstat (limited to 'forum')
-rw-r--r--forum/htdocs/config.php.defaults6
-rw-r--r--forum/utils/notify.php3
2 files changed, 8 insertions, 1 deletions
diff --git a/forum/htdocs/config.php.defaults b/forum/htdocs/config.php.defaults
index ec29e89..8a67e56 100644
--- a/forum/htdocs/config.php.defaults
+++ b/forum/htdocs/config.php.defaults
@@ -10,6 +10,11 @@ $FILE_MAX_SIZE = 5*1024; // 5kb
$FORUM_URL = "http://www.example.com/forum";
$FORUM_TITLE = "Example CMS";
+// Uncomment to use PostToGoogleCalendar through Zend
+//$ZEND_DIR = $UTIL_DIR;
+//$GOOGLE_CALENDAR_USER = "executionroom@gmail.com";
+//$GOOGLE_CALENDAR_PASSWD = "pisoglort";
+
/**
* Mail Configuration
*/
@@ -18,4 +23,5 @@ $sender = "Example User <info@example.com>";
$replyto = $sender;
$footer = "----
Happy happy joy joy!";
+$NOTIFY_RESEND = 60 * 60 * 24 * 7; // Resend notifications after a week.
?>
diff --git a/forum/utils/notify.php b/forum/utils/notify.php
index 9c34e65..8ddbbd0 100644
--- a/forum/utils/notify.php
+++ b/forum/utils/notify.php
@@ -26,6 +26,7 @@ function notify($module = "", $event = "")
{
global $users;
global $current_user;
+ global $NOTIFY_RESEND;
$users_changed = false;
foreach($users->users as $user) {
@@ -36,7 +37,7 @@ function notify($module = "", $event = "")
(
$module == "forum" &&
$user != $current_user && // Don't notify current user.
- $user->notified < (time() - (60 * 60 * 24 * 7)) // Don't notify if already notified.
+ $user->notified < (time() - $NOTIFY_RESEND) // Don't notify if already notified.
)
) {
send($user->email, $module . " changed",