Make RSS From Parent assets always hidden from navigation.
This commit is contained in:
parent
2e608a2a20
commit
f11b0b8b85
3 changed files with 22 additions and 0 deletions
|
|
@ -25,6 +25,7 @@
|
|||
- Fixed behaviour of the Encrypt Login setting, in such way that only the form
|
||||
post containing the login credentials is sent over https. After authentication
|
||||
the user is redirected to http. (Martin Kamerbeek / Procolix)
|
||||
- fix: RSS From Parent assets should always be hidden from navigation
|
||||
|
||||
7.2.3
|
||||
- fix: minor bug with new template vars in Auth::createAccount
|
||||
|
|
|
|||
|
|
@ -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 ----
|
||||
|
||||
#-------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -57,6 +57,13 @@ sub definition {
|
|||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub update {
|
||||
# Re-force isHidden to 1 on each update; these should always be hidden.
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
$self->SUPER::update(+{%$properties, isHidden => 1});
|
||||
}
|
||||
|
||||
sub _escapeXml {
|
||||
my $text = shift;
|
||||
my %entities = ('<' => '<', '>' => '>', '"' => '"', "'" => "'");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue