From 60670a8a08c6ef9463f5662e6972a056e4c6d502 Mon Sep 17 00:00:00 2001 From: Doug Bell Date: Mon, 26 May 2008 22:10:09 +0000 Subject: [PATCH] added asset manager to upgrade --- docs/upgrades/upgrade_7.5.10-7.5.11.pl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/upgrades/upgrade_7.5.10-7.5.11.pl b/docs/upgrades/upgrade_7.5.10-7.5.11.pl index f63d56b6f..760e285c8 100644 --- a/docs/upgrades/upgrade_7.5.10-7.5.11.pl +++ b/docs/upgrades/upgrade_7.5.10-7.5.11.pl @@ -61,6 +61,7 @@ addVendors($session); modifyThingyPossibleValues( $session ); removeLegacyTable($session); migrateSubscriptions( $session ); +addAssetManager( $session ); finish($session); # this line required @@ -80,6 +81,26 @@ sub changeRealtimeWorkflows { print "DONE!\n" unless $quiet; } +#---------------------------------------------------------------------------- +# Add the Asset Manager content handler to the list +# Must go before the Operation content handler (since we use ?op=assetManager) +sub addAssetManager { + my $session = shift; + print "\tAdding new Asset Manager ..." unless $quiet; + + my $config = $session->config; + my @handlers = (); + foreach my $element (@{$config->get("contentHandlers")}) { + if ($element eq "WebGUI::Content::Operation") { + push @handlers, "WebGUI::Content::AssetManager"; + } + push @handlers, $element; + } + $config->set("contentHandlers", \@handlers); + + print "DONE! \n" unless $quiet; +} + #---------------------------------------------------------------------------- sub addCoupon { my $session = shift;