Make RSS From Parent assets always hidden from navigation.

This commit is contained in:
Drake 2006-12-01 19:09:11 +00:00
parent 2e608a2a20
commit f11b0b8b85
3 changed files with 22 additions and 0 deletions

View file

@ -22,6 +22,7 @@ my $session = start(); # this line required
addWikiAssets($session);
deleteOldFiles($session);
addFileFieldsToDataForm($session);
makeRSSFromParentAlwaysHidden($session);
finish($session); # this line required
#-------------------------------------------------
@ -115,6 +116,19 @@ EOT
$session->config->addToArray('assets', 'WebGUI::Asset::Wobject::WikiMaster');
}
sub makeRSSFromParentAlwaysHidden {
my $session = shift;
print "\tHiding RSS From Parent assets.\n" unless $quiet;
# Since it's internal anyway, might as well just do it directly to all the revisions.
$session->db->write($_) for(<<'EOT',
UPDATE assetData AS d INNER JOIN RSSFromParent AS r
ON d.assetId = r.assetId AND d.revisionDate = r.revisionDate
SET d.isHidden = 1
EOT
);
}
# ---- DO NOT EDIT BELOW THIS LINE ----
#-------------------------------------------------