From 9bd63571a9698fd395bc820dec7c36a505099eb0 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Thu, 21 Apr 2005 01:41:09 +0000 Subject: [PATCH] fixed dataform require field bug added cache root option --- docs/changelog/6.x.x.txt | 5 +++++ etc/WebGUI.conf.original | 21 ++++++++++++++++++++- lib/WebGUI/Asset/Wobject/DataForm.pm | 2 +- lib/WebGUI/Cache.pm | 7 ++++++- 4 files changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index b85ee52d5..255104416 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -26,6 +26,11 @@ the Form. - Added a select all option to the clipboard selector in the asset manager. - Added a color picker form field type. + - Fixed a bug where empty required field error messages from the data form + were not being displayed. + - Added a config file option to specify where the file cache is persisted. + + 6.5.6 - Fixed a bunch of mostly cosmetic issues with the commerce system. diff --git a/etc/WebGUI.conf.original b/etc/WebGUI.conf.original index b871131c0..b9885ab00 100644 --- a/etc/WebGUI.conf.original +++ b/etc/WebGUI.conf.original @@ -1,3 +1,10 @@ +###################################### +# assets +###################################### + +# Specify a the list of assets you want to appear in your +# Add Content menus. + assets = WebGUI::Asset::File::Image, \ WebGUI::Asset::File, \ WebGUI::Asset::Snippet, \ @@ -38,8 +45,19 @@ uploadsPath = /data/WebGUI/www/uploads # which allows you to export pages to static html # exportPath = /data/WebGUI/export + + +###################################### +# CACHING +###################################### + templateCacheType=file +# Tell WebGUI where to store cached files. Defaults to the +# /tmp or c:\temp folder depending upon your operating system. + +#fileCacheRoot=/path/to/cache + passiveProfileInterval = 86400 # in seconds paymentPlugins = ITransact @@ -47,7 +65,8 @@ paymentPlugins = ITransact authMethods = LDAP, WebGUI # Enable Web Service Clients to override the default MIME types of SOAP/WDSL content -# soapHttpHeaderOverride=1 + +#soapHttpHeaderOverride=1 macros=# => Hash_userId, \ / => Slash_gatewayUrl, \ diff --git a/lib/WebGUI/Asset/Wobject/DataForm.pm b/lib/WebGUI/Asset/Wobject/DataForm.pm index c6461996c..eebb9e406 100644 --- a/lib/WebGUI/Asset/Wobject/DataForm.pm +++ b/lib/WebGUI/Asset/Wobject/DataForm.pm @@ -1087,7 +1087,7 @@ sub www_process { if ($hadErrors && !$updating) { WebGUI::SQL->write("delete from DataForm_entryData where DataForm_entryId=".quote($entryId)); $self->deleteCollateral("DataForm_entry","DataForm_entryId",$entryId); - $self->www_view($var); + $self->processStyle($self->view($var)); } else { $self->sendEmail($var) if ($self->get("mailData") && !$updating); return WebGUI::Style::process($self->processTemplate($var,$self->get("acknowlegementTemplateId")),$self->get("styleTemplateId")) if $self->defaultViewForm; diff --git a/lib/WebGUI/Cache.pm b/lib/WebGUI/Cache.pm index 07dcbc941..33e02c53e 100644 --- a/lib/WebGUI/Cache.pm +++ b/lib/WebGUI/Cache.pm @@ -111,7 +111,12 @@ sub new { my $class = shift; my $key = shift; my $namespace = shift || $session{config}{configFile}; - $cache = new Cache::FileCache({namespace=>$namespace, auto_purge_on_set=>1}); + my %options = ( + namespace=>$namespace, + auto_purge_on_set=>1 + ); + $options{cache_root} = $session{config}{fileCacheRoot} if ($session{config}{fileCacheRoot}); + $cache = new Cache::FileCache(\%options); bless {_cache => $cache, _key => $key}, $class; }