From ba44d57e9f49d920e3f0192bcfbec86fd0f638d2 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Wed, 2 Jan 2008 22:26:42 +0000 Subject: [PATCH] Merged revisions 5224 via svnmerge from https://svn.webgui.org/plainblack/branch/WebGUI_7.4 ........ r5224 | graham | 2008-01-02 16:18:53 -0600 (Wed, 02 Jan 2008) | 1 line fix: Assets with no committed versions may be left as orphans when parent is purged ........ --- docs/changelog/7.x.x.txt | 3 +++ lib/WebGUI/AssetTrash.pm | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index eb81fcef8..897e5f34b 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -15,6 +15,9 @@ - Fixed chdir problem in Storage -- more remain though - Added a new plugin handler system that is both faster and more secure. +7.4.20 + - fix: Assets with no committed versions may be left as orphans when parent is purged + 7.4.19 - fix: Import Package does nothing when re-importing trashed package - fix: CS Posts get re-ordered when copy/paste diff --git a/lib/WebGUI/AssetTrash.pm b/lib/WebGUI/AssetTrash.pm index 92f395f2e..5647bc0ce 100644 --- a/lib/WebGUI/AssetTrash.pm +++ b/lib/WebGUI/AssetTrash.pm @@ -133,7 +133,11 @@ sub purge { } # assassinate the offspring - my $kids = $self->getLineage(["children"],{returnObjects=>1, statesToInclude=>['published', 'clipboard', 'clipboard-limbo','trash','trash-limbo']}); + my $kids = $self->getLineage(["children"],{ + returnObjects => 1, + statesToInclude => [qw(published clipboard clipboard-limbo trash trash-limbo)], + statusToInclude => [qw(approved archived pending)], + }); foreach my $kid (@{$kids}) { # Technically get lineage should never return an undefined object from getLineage when called like this, but it did so this saves the world from destruction. if (defined $kid) {