You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2011/03/03 08:59:31 UTC
svn commit: r1076550 -
/ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
Author: lektran
Date: Thu Mar 3 07:59:30 2011
New Revision: 1076550
URL: http://svn.apache.org/viewvc?rev=1076550&view=rev
Log:
Change the behavior of content.properties' content.upload.always.local.file property so that it will not force LOCAL_FILE if OFBIZ_FILE is specified. I believe the main intention of the property is to force use of the file system over the db.
Modified:
ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=1076550&r1=1076549&r2=1076550&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml Thu Mar 3 07:59:30 2011
@@ -581,9 +581,23 @@ under the License.
<simple-method method-name="attachUploadToDataResource" short-description="Attach an uploaded file to a data resource">
<set field="isUpdate" value="false"/>
<property-to-field resource="content.properties" property="content.upload.always.local.file" field="forceLocal"/>
- <if-compare field="forceLocal" value="true" operator="equals">
- <set field="parameters.dataResourceTypeId" value="LOCAL_FILE"/>
- </if-compare>
+ <if>
+ <condition>
+ <!-- if (forceLocal && !("LOCAL_FILE".equals(parameters.dataResourceTypeId) || "OFBIZ_FILE".equals(parameters.dataResourceTypeId)) -->
+ <and>
+ <if-compare field="forceLocal" value="true" operator="equals"/>
+ <not>
+ <or>
+ <if-compare field="parameters.dataResourceTypeId" operator="equals" value="LOCAL_FILE"/>
+ <if-compare field="parameters.dataResourceTypeId" operator="equals" value="OFBIZ_FILE"/>
+ </or>
+ </not>
+ </and>
+ </condition>
+ <then>
+ <set field="parameters.dataResourceTypeId" value="LOCAL_FILE"/>
+ </then>
+ </if>
<if-empty field="parameters.dataResourceTypeId">
<!-- create default behavior -->