[Erp5-report] r13434 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 15 17:23:50 CET 2007


Author: romain
Date: Thu Mar 15 17:23:48 2007
New Revision: 13434

URL: http://svn.erp5.org?rev=13434&view=rev
Log:
Use standard where_expression instead of adding hardcoded parameter to the ZSQL Method Base_zSearchRelatedObjectsByCategoryList.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml?rev=13434&r1=13433&r2=13434&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml Thu Mar 15 17:23:48 2007
@@ -39,7 +39,7 @@
                                 </value>
                             </item>
                             <item>
-                                <key> <string>portal_type</string> </key>
+                                <key> <string>order_by_expression</string> </key>
                                 <value>
                                   <dictionary/>
                                 </value>
@@ -50,6 +50,12 @@
                                   <dictionary/>
                                 </value>
                             </item>
+                            <item>
+                                <key> <string>where_expression</string> </key>
+                                <value>
+                                  <dictionary/>
+                                </value>
+                            </item>
                           </dictionary>
                         </value>
                     </item>
@@ -57,9 +63,10 @@
                         <key> <string>_keys</string> </key>
                         <value>
                           <list>
-                            <string>category_list</string>
-                            <string>portal_type</string>
-                            <string>strict_membership</string>
+<string>category_list</string>
+<string>strict_membership</string>
+<string>where_expression</string>
+<string>order_by_expression</string>
                           </list>
                         </value>
                     </item>
@@ -77,8 +84,9 @@
         <item>
             <key> <string>arguments_src</string> </key>
             <value> <string>category_list\r\n
-portal_type\r\n
-strict_membership</string> </value>
+strict_membership\r\n
+where_expression\r\n
+order_by_expression</string> </value>
         </item>
         <item>
             <key> <string>cache_time_</string> </key>
@@ -94,7 +102,9 @@
         </item>
         <item>
             <key> <string>connection_hook</string> </key>
-            <value> <string></string> </value>
+            <value>
+              <none/>
+            </value>
         </item>
         <item>
             <key> <string>connection_id</string> </key>
@@ -116,23 +126,19 @@
             <key> <string>src</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
-<dtml-if portal_type>\n
-SELECT DISTINCT catalog.uid, catalog.path, catalog.relative_url, portal_type\n
-FROM catalog, category\n
-WHERE (<dtml-in portal_type><dtml-unless sequence-start> OR </dtml-unless>catalog.portal_type=\'<dtml-var sequence-item>\'</dtml-in>)\n
-AND catalog.uid = category.uid\n
-AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n
-<dtml-if strict_membership>\n
-  AND category.category_strict_membership = 1\n
-</dtml-if>\n
-<dtml-else>\n
 SELECT DISTINCT catalog.uid, catalog.path, portal_type\n
 FROM catalog, category\n
 WHERE catalog.uid = category.uid\n
-AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n
-<dtml-if strict_membership>\n
-  AND category.category_strict_membership = 1\n
-</dtml-if>\n
+  AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n
+  <dtml-if strict_membership>\n
+    AND category.category_strict_membership = 1\n
+  </dtml-if>\n
+  <dtml-if where_expression>\n
+    AND <dtml-var where_expression>\n
+  </dtml-if>\n
+<dtml-if order_by_expression>\n
+ORDER BY\n
+  <dtml-var order_by_expression>\n
 </dtml-if>
 
 ]]></string> </value>
@@ -171,23 +177,19 @@
                         <key> <string>raw</string> </key>
                         <value> <string encoding="cdata"><![CDATA[
 
-<dtml-if portal_type>\n
-SELECT DISTINCT catalog.uid, catalog.path, catalog.relative_url, portal_type\n
-FROM catalog, category\n
-WHERE (<dtml-in portal_type><dtml-unless sequence-start> OR </dtml-unless>catalog.portal_type=\'<dtml-var sequence-item>\'</dtml-in>)\n
-AND catalog.uid = category.uid\n
-AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n
-<dtml-if strict_membership>\n
-  AND category.category_strict_membership = 1\n
-</dtml-if>\n
-<dtml-else>\n
 SELECT DISTINCT catalog.uid, catalog.path, portal_type\n
 FROM catalog, category\n
 WHERE catalog.uid = category.uid\n
-AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n
-<dtml-if strict_membership>\n
-  AND category.category_strict_membership = 1\n
-</dtml-if>\n
+  AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n
+  <dtml-if strict_membership>\n
+    AND category.category_strict_membership = 1\n
+  </dtml-if>\n
+  <dtml-if where_expression>\n
+    AND <dtml-var where_expression>\n
+  </dtml-if>\n
+<dtml-if order_by_expression>\n
+ORDER BY\n
+  <dtml-var order_by_expression>\n
 </dtml-if>
 
 ]]></string> </value>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=13434&r1=13433&r2=13434&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision Thu Mar 15 17:23:48 2007
@@ -1,1 +1,1 @@
-267
+268




More information about the Erp5-report mailing list