From 5115e364eb79547e44350714d4735d20bc539ff4 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Sat, 23 Apr 2005 18:32:11 +0000 Subject: [PATCH] added upgrade to move template into utility assets --- docs/upgrades/upgrade_6.5.6-6.6.0.pl | 6 ++++ etc/WebGUI.conf.original | 44 ++-------------------------- lib/WebGUI/Asset.pm | 4 ++- 3 files changed, 11 insertions(+), 43 deletions(-) diff --git a/docs/upgrades/upgrade_6.5.6-6.6.0.pl b/docs/upgrades/upgrade_6.5.6-6.6.0.pl index fb978b898..ea2a79d76 100644 --- a/docs/upgrades/upgrade_6.5.6-6.6.0.pl +++ b/docs/upgrades/upgrade_6.5.6-6.6.0.pl @@ -33,6 +33,12 @@ foreach my $key ($conf->directives) { $newConfig{$key} = $conf->get($key); } } +my @newAssetList; +foreach my $asset (@{$newConfig{assets}}) { + push(@newAssetList, $asset) unless ($asset eq "WebGUI::Asset::Template"); +} +$newConfig{utilityAssets} = ["WebGUI::Asset::Template"]; +$newConfig{assets} = \@newAssetList; $conf->purge; $conf->set(%newConfig); $conf->write; diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index 374afb87f..3576b5eb2 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -1,7 +1,3 @@ -###################################### -# PATHS AND URLS -###################################### - # Add a comma seperated list of the names this site can use. sitename = www.example.com, example.com @@ -38,12 +34,6 @@ uploadsPath = /data/WebGUI/www/uploads #fileCacheRoot=/path/to/cache - - -###################################### -# DATABASE CONFIGURATION -###################################### - # The database connection string. It usually takes the form of # DBI::;host= @@ -57,8 +47,8 @@ dbuser = webgui dbpass = password -# You can configure up to three read-only slaves to increase -# WebGUI's read performance. +# You can configure up to three read-only database slaves to +# increase WebGUI's read performance. #dbslave1 = dsn => DBI:mysql:www_example_com;host=dbslave1.example.com, \ # dbuser => webgui, \ @@ -72,34 +62,16 @@ dbpass = password # dbuser => webgui, \ # dbpass => password - - -###################################### -# AUTHENTICATION -###################################### - # List the authentication plug-ins you wish to be available on # this site. authMethods = LDAP, WebGUI - - -###################################### -# COMMERCE -###################################### - # List the merchant gateways you have installed and wish to be # available on this site. paymentPlugins = ITransact - - -###################################### -# ASSETS -###################################### - # Specify a the list of assets you want to appear in your # Add Content menus. @@ -168,12 +140,6 @@ DeleteExpiredEvents_offset = 30 templateCacheType=file - - -###################################### -# MACROS -###################################### - # Specify the list of macros you wish to be processed on each page. macros=# => Hash_userId, \ @@ -217,12 +183,6 @@ macros=# => Hash_userId, \ r => r_printable, \ u => u_companyUrl - - -###################################### -# SCHEDULED TASKS -###################################### - # A comma seperated list of scheduler plugins that you do NOT want # to run. Normally there's no reason to use this option. diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 85a1b50d4..5f0c4a935 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -743,8 +743,10 @@ sub getAssetAdderLinks { } } my $constraint; - if ($getContainerLinks) { + if ($type eq "assetContainers") { $constraint = quoteAndJoin($session{config}{assetContainers}); + } elsif ($type eq "utilityAssets") { + $constraint = quoteAndJoin($session{config}{utilityAssets}); } else { $constraint = quoteAndJoin($session{config}{assets}); }