merging 6.5.6 bug fixes

This commit is contained in:
JT Smith 2005-04-05 13:32:22 +00:00
parent 8ea183be00
commit 0554039f51
8 changed files with 296 additions and 14 deletions

View file

@ -15,12 +15,16 @@ use strict;
use WebGUI::DateTime;
use WebGUI::Session;
use WebGUI::SQL;
use WebGUI::Asset::Event;
#-----------------------------------------
sub process {
if ($session{config}{DeleteExpiredEvents_offset} ne "") {
WebGUI::SQL->write("delete from EventsCalendar_event where endDate < "
.(time()-(86400*$session{config}{DeleteExpiredEvents_offset})));
my $sth = WebGUI::SQL->read("select assetId from EventsCalendar_event where eventEndDate < ".(time()-(86400*$session{config}{DeleteExpiredEvents_offset})));
while (my ($id) = $sth->array) {
WebGUI::Asset::Event->new($id)->purge;
}
$sth->finish;
}
}