[ postfixadmin-Bugs-2025263 ] vacation_notification is never updated
Brought to you by:
christian_boltz,
gingerdog
From: SourceForge.net <no...@so...> - 2008-08-06 22:03:35
|
Bugs item #2025263, was opened at 2008-07-23 01:18 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=2025263&group_id=191583 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Vacation Group: v 2.2 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: vacation_notification is never updated Initial Comment: According to the table relations, a "on delete cascade" from vacation to vacation_notification should remove all records in vacation_notification of people who have received an away message once the vacation message is disabled. Since in v2.2, the actual message entry in vacation is never really deleted but rather set to active=0, the "delete on cascade" is never triggered, and the notification records stay in the table. This means that once vacation is enabled (e.g. Christmas), disabled (January), and re-enabled (Easter), no new vacation messages get sent during Easter to people who received one already for Christmas. Can this be fixed with another trigger? Thanks, ach...@qu... ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-08-06 22:03 Message: Logged In: NO This has been solved in <http://sourceforge.net/forum/forum.php?thread_id=2129163&forum_id=676076> and the patch was submitted to SVN r432. update edit-vacation.php from: // retain vacation message if possible - i.e disable vacation away-ness. $result = db_query ("UPDATE $table_vacation SET active = $db_false WHERE email='$fUsername'"); $result = db_query ("SELECT * FROM $table_alias WHERE address='$fUsername'"); to: // retain vacation message if possible - i.e disable vacation away-ness. $result = db_query ("UPDATE $table_vacation SET active = $db_false WHERE email='$fUsername'"); $result = db_query("DELETE FROM $table_vacation_notification WHERE on_vacation='$fUsername'"); $result = db_query ("SELECT * FROM $table_alias WHERE address='$fUsername'"); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=937964&aid=2025263&group_id=191583 |