fixed: Can't purge uncommitted assets if not using its version tag

This commit is contained in:
Graham Knop 2008-03-24 09:43:29 +00:00
parent 72b8e1d630
commit 59282033ea
2 changed files with 3 additions and 2 deletions

View file

@ -14,6 +14,7 @@
- fixed: Optional pubDate RSS field generates warnings when missing - fixed: Optional pubDate RSS field generates warnings when missing
- fixed: Collaboration System threads can return other object types when asked for replies - fixed: Collaboration System threads can return other object types when asked for replies
- fixed: Able to cut or trash system assets - fixed: Able to cut or trash system assets
- fixed: Can't purge uncommitted assets if not using its version tag
7.5.7 7.5.7
- fixed: HttpProxy mixes original site's content encoding with WebGUI's - fixed: HttpProxy mixes original site's content encoding with WebGUI's

View file

@ -282,7 +282,7 @@ Moves list of assets to trash, returns www_manageAssets() method of self if canE
sub www_deleteList { sub www_deleteList {
my $self = shift; my $self = shift;
foreach my $assetId ($self->session->form->param("assetId")) { foreach my $assetId ($self->session->form->param("assetId")) {
my $asset = WebGUI::Asset->newByDynamicClass($self->session,$assetId); my $asset = WebGUI::Asset->newPending($self->session,$assetId);
if ($asset->canEdit && $asset->canEditIfLocked) { if ($asset->canEdit && $asset->canEditIfLocked) {
$asset->trash; $asset->trash;
} }
@ -376,7 +376,7 @@ Purges a piece of content, including all it's revisions, from the system permane
sub www_purgeList { sub www_purgeList {
my $self = shift; my $self = shift;
foreach my $id ($self->session->form->param("assetId")) { foreach my $id ($self->session->form->param("assetId")) {
my $asset = WebGUI::Asset->newByDynamicClass($self->session,$id); my $asset = WebGUI::Asset->newPending($self->session,$id);
$asset->purge if $asset->canEdit; $asset->purge if $asset->canEdit;
} }
if ($self->session->form->process("proceed") ne "") { if ($self->session->form->process("proceed") ne "") {