largersmallernormaltext version of this page

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0014762 [phplist] Repetition tweak sometimes 30-05-08 11:38 30-05-08 15:10
Reporter flohack View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version 2.10.5
Summary 0014762: RSS-Messages get wrong embargo time
Description after a few months of running without this problem, messages are suddenly rewritten with the wrong embargo time (end of job + frequency instead of beginning of job + frequency).
the other day the cron job finds a message still on hold, as the embargo is not reached and skips the submission.
Additional Information Our investiagtion in the PHP code discovered the cause of the problem (or the sympton?): The embargo is set to either old_embargo + frequency or now() + frequency on the end of the queue run. based on a flag isfuture, the decision is wrongly made for the second option, as the condition "date_add(embargo,interval repeatinterval minute) > now() as isfuture" is always true. newembargo is calculated: "date_add(embargo,interval repeatinterval minute)", and newembargo2 as "date_add(now(),interval repeatinterval minute)"
then there are some lines not connected with this code, finally:

# correct some values
        if (!$msgdata["isfuture"]) {
                $msgdata["newembargo"] = $msgdata["newembargo2"];

this is bad coding style, not connected with the first few lines which actually calculate these values, and the whole construct is simply not correct. The clause should be IMHO "date_add(embargo,interval repeatinterval minute) < now()", then an incorrect embargo would be detected, and the normal case would be handled as it should be.

thanks for reading up to here.
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker