From 82e7e807ab8b812c5b8344aebccf2d7f12bae05e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 6 Nov 2009 14:05:32 -0800 Subject: [PATCH] Fix bug #11101. Folders from an earlier upgrade had their package flag set. --- docs/changelog/7.x.x.txt | 1 + docs/upgrades/upgrade_7.8.4-7.8.5.pl | 29 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 308c6fba9..099f46087 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -2,6 +2,7 @@ - The captcha form control had it's built in styles removed in favor of two classes: "wg-captchaForm" and "wg-captchaImage" - fixed #11134: Tree Navigation menu colapses sub items of current page - fixed #11203: Manage groups in group: everyone added on save + - fixed #11101: 7.6.35-7.7 upgrade leaves packages 7.8.4 - Fixed a compatibility problem between WRE and new Spectre code. diff --git a/docs/upgrades/upgrade_7.8.4-7.8.5.pl b/docs/upgrades/upgrade_7.8.4-7.8.5.pl index 731a40095..ca598c142 100644 --- a/docs/upgrades/upgrade_7.8.4-7.8.5.pl +++ b/docs/upgrades/upgrade_7.8.4-7.8.5.pl @@ -29,6 +29,7 @@ my $quiet; # this line required my $session = start(); # this line required +fixPackageFlagOnOlder( $session ); # upgrade functions go here @@ -44,6 +45,34 @@ finish($session); # this line required # print "DONE!\n" unless $quiet; #} +sub fixPackageFlagOnOlder { + my $session = shift; + print "\tFixing isPackage flag on folders from 7.6.35 to 7.7.17 upgrade... " unless $quiet; + + my @assetIds = qw( TvOZs8U1kRXLtwtmyW75pg + tXwf1zaOXTvsqPn6yu-GSw + tPagC0AQErZXjLFZQ6OI1g + brxm_faNdZX5tRo3p50g3g + BFfNj5wA9bDw8H3cnr8pTw + VZK3CRgiMb8r4dBjUmCTgQ + 2c4RcwsUfQMup_WNujoTGg + f_tn9FfoSfKWX43F83v_3w + oGfxez5sksyB_PcaAsEm_Q + GaBAW-2iVhLMJaZQzVLE5A + 7-0-style0000000000049 + GYaFxnMu9UsEG8oanwB6TA + ); + + for my $assetId ( @assetIds ) { + my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId ); + next unless $asset; + next unless $asset->get('isPackage'); + $asset->addRevision({ isPackage => 0 }); + } + + print "Done.\n" unless $quiet; +} + # -------------- DO NOT EDIT BELOW THIS LINE --------------------------------