more bug fixes
This commit is contained in:
parent
c456b708de
commit
8664a34f1e
7 changed files with 16 additions and 9 deletions
|
|
@ -23,12 +23,12 @@ sub process {
|
|||
my $a = WebGUI::SQL->read("select asset.lineage,Collaboration.archiveAfter from Collaboration left join asset on Collaboration.assetId=asset.assetId");
|
||||
while (my ($lineage, $archiveAfter) = $a->array) {
|
||||
my $archiveDate = $epoch - $archiveAfter;
|
||||
my $sql = "select * from Post left join asset on Post.assetId=asset.assetId left join Thread on Thread.assetId=Post.assetId
|
||||
where Post.dateUpdated<$archiveDate and Post.status='approved' and asset.lineage like ".quote($lineage."%");
|
||||
my $sql = "select asset.assetId,asset.className, max(assetData.revisionDate) from Post left join asset on Post.assetId=asset.assetId
|
||||
left join assetData on Post.assetId=assetData.assetId and assetData.revisionDate=Post.revisionDate
|
||||
where Post.dateUpdated<$archiveDate and assetData.status='approved' and asset.lineage like ".quote($lineage."%")." group by asset.assetId";
|
||||
my $b = WebGUI::SQL->read($sql);
|
||||
while (my $properties = $b->hashRef) {
|
||||
my $post = WebGUI::Asset::Post->newByPropertyHashRef($properties);
|
||||
$post->setStatusArchived;
|
||||
while (my ($id, $class, $version) = $b->array) {
|
||||
WebGUI::Asset::Post->new($id,$class,$version)->setStatusArchived;
|
||||
}
|
||||
$b->finish;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ use WebGUI::Asset::Wobject::IndexedSearch::Search;
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
#disabled until 6.8
|
||||
return "";
|
||||
my $indexName = 'IndexedSearch_default';
|
||||
my $htmlFilter = 'all';
|
||||
my $stopList = 'none';
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ sub process {
|
|||
if ($offset ne "") {
|
||||
my $epoch = time()-(86400*$offset);
|
||||
my $sth = WebGUI::SQL->read("select asset.assetId,asset.className,max(assetData.revisionDate) from asset left join assetData on
|
||||
asset.assetId=assetData.assetId where assetData.endDate<".$epoch." and assetData.status<>'pending' group by asset.assetData");
|
||||
asset.assetId=assetData.assetId where assetData.endDate<".$epoch." group by assetData.assetId");
|
||||
while (my ($assetId, $class, $version) = $sth->array) {
|
||||
my $asset = WebGUI::Asset->new($assetId,$class,$version);
|
||||
$asset->trash;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue