merging 6.7.8 changes and bug fixes
This commit is contained in:
parent
4bd429bcac
commit
fdfb9bf5ae
8 changed files with 95 additions and 58 deletions
|
|
@ -15,10 +15,14 @@ use strict;
|
|||
use WebGUI::Asset;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::DateTime;
|
||||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
if ($session{config}{DeleteExpiredRevisions_offset} ne "") {
|
||||
my $hour = WebGUI::DateTime::epochToHuman(time(),"%H");
|
||||
my $dow = WebGUI::DateTime::epochToHuman(time(),"%W");
|
||||
return unless ($hour == 3 && $dow eq "Sun");
|
||||
my $expireDate = (time()-(86400*$session{config}{DeleteExpiredRevisions_offset}));
|
||||
my $sth = WebGUI::SQL->read("select assetData.assetId,asset.className,assetData.revisionDate from asset left join assetData on asset.assetId=assetData.assetId where assetData.revisionDate<".$expireDate." order by assetData.revisionDate asc");
|
||||
while (my ($id, $class, $version) = $sth->array) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue