Commit 334114a9 authored by Jérome Perrin's avatar Jérome Perrin

apply the limit to both parts of the UNION, but only for the first page...

apply the limit to both parts of the UNION, but only for the first page (impossible to do this for next pages)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34016 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 535637c6
...@@ -811,6 +811,12 @@ destination_section_where_expression</string> </value> ...@@ -811,6 +811,12 @@ destination_section_where_expression</string> </value>
)\n )\n
</dtml-if>\n </dtml-if>\n
\n \n
<dtml-if "not (count or stat) and query[\'limit_expression\'] and query[\'limit_expression\'].startswith(\'0\')">\n
<dtml-if "query[\'order_by_expression\']">\n
ORDER BY <dtml-var "query[\'order_by_expression\'].split(\'.\')[-1]">\n
</dtml-if>\n
LIMIT <dtml-var "query[\'limit_expression\']">\n
</dtml-if>\n
)\n )\n
\n \n
\n \n
...@@ -991,6 +997,14 @@ UNION\n ...@@ -991,6 +997,14 @@ UNION\n
</dtml-in>\n </dtml-in>\n
)\n )\n
</dtml-if>\n </dtml-if>\n
\n
<dtml-if "not (count or stat) and query[\'limit_expression\'] and query[\'limit_expression\'].startswith(\'0\')">\n
<dtml-if "query[\'order_by_expression\']">\n
ORDER BY <dtml-var "query[\'order_by_expression\'].split(\'.\')[-1]">\n
</dtml-if>\n
LIMIT <dtml-var "query[\'limit_expression\']">\n
</dtml-if>\n
\n
)\n )\n
\n \n
\n \n
...@@ -1456,6 +1470,12 @@ UNION\n ...@@ -1456,6 +1470,12 @@ UNION\n
)\n )\n
</dtml-if>\n </dtml-if>\n
\n \n
<dtml-if "not (count or stat) and query[\'limit_expression\'] and query[\'limit_expression\'].startswith(\'0\')">\n
<dtml-if "query[\'order_by_expression\']">\n
ORDER BY <dtml-var "query[\'order_by_expression\'].split(\'.\')[-1]">\n
</dtml-if>\n
LIMIT <dtml-var "query[\'limit_expression\']">\n
</dtml-if>\n
)\n )\n
\n \n
\n \n
...@@ -1636,6 +1656,14 @@ UNION\n ...@@ -1636,6 +1656,14 @@ UNION\n
</dtml-in>\n </dtml-in>\n
)\n )\n
</dtml-if>\n </dtml-if>\n
\n
<dtml-if "not (count or stat) and query[\'limit_expression\'] and query[\'limit_expression\'].startswith(\'0\')">\n
<dtml-if "query[\'order_by_expression\']">\n
ORDER BY <dtml-var "query[\'order_by_expression\'].split(\'.\')[-1]">\n
</dtml-if>\n
LIMIT <dtml-var "query[\'limit_expression\']">\n
</dtml-if>\n
\n
)\n )\n
\n \n
\n \n
......
1142 1146
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment