- fix [ 1305132 ] 6.7.5 Assets are moved to trash by runHourly
- fix [ 1282473 ] RSS encoding (Thanks to Klaus Hertle)
This commit is contained in:
parent
5144b65842
commit
fda03a0e63
4 changed files with 10 additions and 9 deletions
|
|
@ -26,6 +26,8 @@
|
|||
instead of raw <p> tags without <html><head>etc</head><body></body>
|
||||
- fix [ 1293897 ] 6.7.4 - asset manager reorder by rank
|
||||
- fix [ 1299131 ] paragraph tags added every time collaboration message change
|
||||
- fix [ 1305132 ] 6.7.5 Assets are moved to trash by runHourly
|
||||
- fix [ 1282473 ] RSS encoding (Thanks to Klaus Hertle)
|
||||
|
||||
|
||||
6.7.6
|
||||
|
|
|
|||
|
|
@ -1129,7 +1129,7 @@ sub www_viewRSS {
|
|||
my $encTitle = _xml_encode($self->get("title"));
|
||||
my $encDescription = _xml_encode($self->get("description"));
|
||||
my $encUrl = _xml_encode($self->getUrl);
|
||||
my $xml = qq~<?xml version="1.0"?>
|
||||
my $xml = qq~<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>$encTitle</title>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Loops through all the URLs in the SyndicatedWobjects and puts them into WebGUI::
|
|||
sub process{
|
||||
|
||||
#In the new Wobject, "rssURL" actually can refer to more than one URL.
|
||||
my @syndicatedWobjectURLs = WebGUI::SQL->buildArray("select rssUrl from SyndicatedContent");
|
||||
my @syndicatedWobjectURLs = WebGUI::SQL->buildArray("select distinct SyndicatedContent.rssUrl from SyndicatedContent left join asset on SyndicatedContent.assetId=asset.assetId where asset.state='published'");
|
||||
foreach my $url(@syndicatedWobjectURLs) {
|
||||
|
||||
#Loop through the SyndicatedWobjects and split all the URLs they are syndicating off into
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ package Hourly::TrashExpiredContent;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::DateTime;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
|
|
@ -20,12 +19,12 @@ use WebGUI::SQL;
|
|||
sub process {
|
||||
my $offset = $session{config}{TrashExpiredContent_offset};
|
||||
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." group by assetData.assetId");
|
||||
while (my ($assetId, $class, $version) = $sth->array) {
|
||||
my $asset = WebGUI::Asset->new($assetId,$class,$version);
|
||||
$asset->trash if ($asset->get("endDate") < $epoch);
|
||||
my $now = time();
|
||||
$offset = 86400*$offset;
|
||||
my $sth = WebGUI::SQL->read("select asset.assetId, asset.className from assetData left join asset on assetData.assetId=asset.assetId where asset.state='published' and assetData.endDate + $offset < $now");
|
||||
while (my ($assetId,$class) = $sth->array) {
|
||||
my $asset = WebGUI::Asset->new($assetId,$class);
|
||||
$asset->trash if ($asset->get("endDate")+$offset < $now); # verify end date of most recent revision
|
||||
}
|
||||
$sth->finish;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue