diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt
index 30936a7b7..335ece870 100644
--- a/docs/changelog/6.x.x.txt
+++ b/docs/changelog/6.x.x.txt
@@ -26,6 +26,8 @@
instead of raw
tags without
etc
- 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
diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm
index e0df42fd4..d2838c107 100644
--- a/lib/WebGUI/Asset/Wobject/Collaboration.pm
+++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm
@@ -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~
+ my $xml = qq~
$encTitle
diff --git a/sbin/Hourly/GetSyndicatedContent.pm b/sbin/Hourly/GetSyndicatedContent.pm
index 8a39d0bf1..2a419f666 100644
--- a/sbin/Hourly/GetSyndicatedContent.pm
+++ b/sbin/Hourly/GetSyndicatedContent.pm
@@ -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
diff --git a/sbin/Hourly/TrashExpiredContent.pm b/sbin/Hourly/TrashExpiredContent.pm
index 5ecffec49..2a319737c 100644
--- a/sbin/Hourly/TrashExpiredContent.pm
+++ b/sbin/Hourly/TrashExpiredContent.pm
@@ -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;
}