added upgrade to move template into utility assets

This commit is contained in:
JT Smith 2005-04-23 18:32:11 +00:00
parent cb17c19f23
commit 5115e364eb
3 changed files with 11 additions and 43 deletions

View file

@ -33,6 +33,12 @@ foreach my $key ($conf->directives) {
$newConfig{$key} = $conf->get($key); $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->purge;
$conf->set(%newConfig); $conf->set(%newConfig);
$conf->write; $conf->write;

View file

@ -1,7 +1,3 @@
######################################
# PATHS AND URLS
######################################
# Add a comma seperated list of the names this site can use. # Add a comma seperated list of the names this site can use.
sitename = www.example.com, example.com sitename = www.example.com, example.com
@ -38,12 +34,6 @@ uploadsPath = /data/WebGUI/www/uploads
#fileCacheRoot=/path/to/cache #fileCacheRoot=/path/to/cache
######################################
# DATABASE CONFIGURATION
######################################
# The database connection string. It usually takes the form of # The database connection string. It usually takes the form of
# DBI:<driver>:<db>;host=<hostname> # DBI:<driver>:<db>;host=<hostname>
@ -57,8 +47,8 @@ dbuser = webgui
dbpass = password dbpass = password
# You can configure up to three read-only slaves to increase # You can configure up to three read-only database slaves to
# WebGUI's read performance. # increase WebGUI's read performance.
#dbslave1 = dsn => DBI:mysql:www_example_com;host=dbslave1.example.com, \ #dbslave1 = dsn => DBI:mysql:www_example_com;host=dbslave1.example.com, \
# dbuser => webgui, \ # dbuser => webgui, \
@ -72,34 +62,16 @@ dbpass = password
# dbuser => webgui, \ # dbuser => webgui, \
# dbpass => password # dbpass => password
######################################
# AUTHENTICATION
######################################
# List the authentication plug-ins you wish to be available on # List the authentication plug-ins you wish to be available on
# this site. # this site.
authMethods = LDAP, WebGUI authMethods = LDAP, WebGUI
######################################
# COMMERCE
######################################
# List the merchant gateways you have installed and wish to be # List the merchant gateways you have installed and wish to be
# available on this site. # available on this site.
paymentPlugins = ITransact paymentPlugins = ITransact
######################################
# ASSETS
######################################
# Specify a the list of assets you want to appear in your # Specify a the list of assets you want to appear in your
# Add Content menus. # Add Content menus.
@ -168,12 +140,6 @@ DeleteExpiredEvents_offset = 30
templateCacheType=file templateCacheType=file
######################################
# MACROS
######################################
# Specify the list of macros you wish to be processed on each page. # Specify the list of macros you wish to be processed on each page.
macros=# => Hash_userId, \ macros=# => Hash_userId, \
@ -217,12 +183,6 @@ macros=# => Hash_userId, \
r => r_printable, \ r => r_printable, \
u => u_companyUrl u => u_companyUrl
######################################
# SCHEDULED TASKS
######################################
# A comma seperated list of scheduler plugins that you do NOT want # A comma seperated list of scheduler plugins that you do NOT want
# to run. Normally there's no reason to use this option. # to run. Normally there's no reason to use this option.

View file

@ -743,8 +743,10 @@ sub getAssetAdderLinks {
} }
} }
my $constraint; my $constraint;
if ($getContainerLinks) { if ($type eq "assetContainers") {
$constraint = quoteAndJoin($session{config}{assetContainers}); $constraint = quoteAndJoin($session{config}{assetContainers});
} elsif ($type eq "utilityAssets") {
$constraint = quoteAndJoin($session{config}{utilityAssets});
} else { } else {
$constraint = quoteAndJoin($session{config}{assets}); $constraint = quoteAndJoin($session{config}{assets});
} }