fix: Shortcuts now follow their linked asset when trashing, purging, and restoring from trash

This commit is contained in:
Doug Bell 2007-10-05 00:27:14 +00:00
parent e41f544f4f
commit f684e728c8
4 changed files with 162 additions and 18 deletions

View file

@ -1976,6 +1976,16 @@ sub publish {
$cache->deleteChunk(["asset",$id]);
}
$self->{_properties}{state} = "published";
# Also publish any shortcuts to this asset that are in the trash
my $shortcuts
= WebGUI::Asset::Shortcut->getShortcutsForAssetId($self->session, $self->getId, {
returnObjects => 1,
statesToInclude => ['trash','trash-limbo'],
});
for my $shortcut ( @$shortcuts ) {
$shortcut->publish;
}
}