Updated to take their configurable parameters from the config file.
This commit is contained in:
parent
55108689b4
commit
0f2350d4c5
5 changed files with 46 additions and 45 deletions
|
|
@ -1,7 +1,5 @@
|
|||
package Hourly::DeleteExpiredEvents;
|
||||
|
||||
my $offset = 0; # in days, time to wait before deleting
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2002 Plain Black LLC.
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -19,7 +17,10 @@ use WebGUI::SQL;
|
|||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
WebGUI::SQL->write("delete from EventsCalendar_event where endDate<".(time()-(86400*$offset)));
|
||||
if ($session{config}{DeleteExpiredEvents_offset} ne "") {
|
||||
WebGUI::SQL->write("delete from EventsCalendar_event where endDate < "
|
||||
.(time()-(86400*$session{config}{DeleteExpiredEvents}{offset})));
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue