diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index dc1cb8576..c7eb49a7b 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -3,6 +3,11 @@ Firefox 1.5. - Now that we're requiring Perl 5.8, don't need to do the hackery for WS Client to work any longer. + - Fixed a major versioning system bug where when purging the last revision of + an asset, if it had children, the children were not purged with it. This + may have caused problems in some people's databases. If it has all you + need to do to fix it is upgrade to this release and then run + sbin/rebuildLineage.pl 6.8.0 - Switched Date::Manip to DateTime for better performance and more diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 39562e9bb..1cd626283 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,11 +7,18 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. -6.8.0 +6.8.1 -------------------------------------------------------------------- * Before upgrading you must install the following new Perl modules: Data::Structure::Util + * Fixed a major versioning system bug in this release where when purging + the last revision of an asset, if it had children, the children were + not purged with it. This may have caused problems in some people's + databases if they used any 6.7.x version or 6.8.0. If it has all you + need to do to fix it is upgrade to this release and then run + sbin/rebuildLineage.pl + 6.8.0 -------------------------------------------------------------------- diff --git a/lib/WebGUI/AssetBranch.pm b/lib/WebGUI/AssetBranch.pm index 16e92e086..a52ca3533 100644 --- a/lib/WebGUI/AssetBranch.pm +++ b/lib/WebGUI/AssetBranch.pm @@ -78,7 +78,7 @@ Returns 1. Purges self and all descendants. sub purgeBranch { my $self = shift; - my $descendants = $self->getLineage(["self","descendants"],{returnObjects=>1, invertTree=>1, statesToInclude=>['trash','trash-limbo']}); + my $descendants = $self->getLineage(["self","descendants"],{returnObjects=>1, invertTree=>1, statesToInclude=>['published', 'cliboard', 'clipboard-limbo','trash','trash-limbo']}); foreach my $descendant (@{$descendants}) { $descendant->purge; } diff --git a/lib/WebGUI/AssetVersioning.pm b/lib/WebGUI/AssetVersioning.pm index 7b7c8ce50..108f954cf 100644 --- a/lib/WebGUI/AssetVersioning.pm +++ b/lib/WebGUI/AssetVersioning.pm @@ -210,7 +210,7 @@ sub purgeRevision { $self->purgeCache; $self->updateHistory("purged revision ".$self->get("revisionDate")); } else { - $self->purge; + $self->purgeBranch; } }