svn commit: r691211 - /ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r691211 - /ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

mor-2
Author: mor
Date: Tue Sep  2 05:14:43 2008
New Revision: 691211

URL: http://svn.apache.org/viewvc?rev=691211&view=rev
Log:
Code optimization. Thanks Adrian, Ashish for help.

Modified:
    ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Modified: ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=691211&r1=691210&r2=691211&view=diff
==============================================================================
--- ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/applications/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Tue Sep  2 05:14:43 2008
@@ -1517,12 +1517,8 @@
                 <set field="disabledDateTime" from-field="parameters.disabledDateTime" type="Date"/>
             <else>
                 <now-date-to-env env-name="nowTimeStamp"/>
-                <if-not-empty field="parameters.disableForYear">
-                    <set-calendar field="disabledDateTime" from-field="nowTimeStamp" years="${parameters.disableForYear}"/>
-                <else>
-                    <set-calendar field="disabledDateTime" from-field="nowTimeStamp" years="20"/>
-                </else>
-                </if-not-empty>
+                <set field="disableForYears" from-field="parameters.disableForYears" default-value="20"/>
+                <set-calendar field="disabledDateTime" from-field="nowTimeStamp" years="${disableForYears}"/>
             </else>
             </if-not-empty>
             <set field="loggedInUser.disabledDateTime" from-field="disabledDateTime"/>