• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4014: Notify time being reset when there are no changes

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension MailerContrib Normal Closed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Hi Crawford, I noticed a small bug when the mailnotify script is called when no changes have occurred on a web. The last notification time was being reset back to 0, and then the next round in the cron would resend all the same notifications again. Here is a patch to fix the problem:

--- Mailer.pm   2007-04-24 10:13:59.000000000 -0700
+++ Mailer.pm   2007-05-03 15:01:28.000000000 -0700
@@ -204,9 +204,12 @@

     $report .= _sendNewsletterMails( $twiki, $web, \%allSet);

-    if( open(F, ">$notmeta" )) {
-        print F $timeOfLastChange;
-        close(F);
+    if($timeOfLastChange != 0)
+    {
+        if( open(F, ">$notmeta" )) {
+            print F $timeOfLastChange;
+            close(F);
+        }
     }

     return $report;

-- TWiki:Main.JeffCrawford - 03 May 2007

Jeff's patch was right on the money

CC

ItemTemplate
Summary Notify time being reset when there are no changes
ReportedBy TWiki:Main.JeffCrawford
Codebase

SVN Range TWiki-4.1.2, Thu, 03 May 2007, build 13616
AppliesTo Extension
Component MailerContrib
Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:13623
TargetRelease n/a
ReleasedIn

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2007-05-05 - TWikiUserMapping_CrawfordCurrie
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback