fixed bug where shortcuts weren't purged along with assets when both were in the trash

This commit is contained in:
Wes Morgan 2009-09-26 01:30:15 -06:00
parent 4583ce14fb
commit 4d22e7bcd6
3 changed files with 42 additions and 24 deletions

View file

@ -1288,6 +1288,8 @@ sub getShortcutsForAssetId {
$properties->{ joinClass } = 'WebGUI::Asset::Shortcut';
$properties->{ whereClause } = 'Shortcut.shortcutToAssetId = ' . $db->quote($assetId);
$properties->{ statesToInclude } = ['published', 'trash', 'clipboard', 'clipboard-limbo', 'trash-limbo'];
$properties->{ statusToInclude } = ['approved', 'pending', 'archived'];
return WebGUI::Asset->getRoot($session)->getLineage(['descendants'], $properties);
}

View file

@ -161,7 +161,7 @@ sub purge {
}
# Delete shortcuts to this asset
# Also publish any shortcuts to this asset that are in the trash
# Also purge any shortcuts to this asset that are in the trash
$outputSub->($i18n->get('Purging shortcuts'));
my $shortcuts
= WebGUI::Asset::Shortcut->getShortcutsForAssetId($self->session, $self->getId, {