fix: Shortcuts now follow their linked asset when trashing, purging, and restoring from trash
This commit is contained in:
parent
e41f544f4f
commit
f684e728c8
4 changed files with 162 additions and 18 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue