Commit 5ee5efac authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

the argument name for sort in portal_catalog is not 'order_by' but 'sort_on'.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@28377 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent abb36c89
......@@ -81,7 +81,7 @@ notification_message_list = portal_catalog(reference=reference,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
language=language,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
**kw)\n
\n
......@@ -91,7 +91,7 @@ if len(notification_message_list) == 0 and language != \'en\':\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
language=\'en\',\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
**kw)\n
\n
......@@ -100,7 +100,7 @@ if len(notification_message_list) == 0:\n
notification_message_list = portal_catalog(reference=reference,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
**kw)\n
\n
......
625
\ No newline at end of file
626
\ No newline at end of file
......@@ -94,7 +94,7 @@ web_page_list = portal_catalog(reference=name,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
language=language,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......@@ -105,7 +105,7 @@ if len(web_page_list) == 0 and language != \'en\':\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
language=\'en\',\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......@@ -115,7 +115,7 @@ if len(web_page_list) == 0:\n
web_page_list = portal_catalog(reference=name,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......@@ -127,7 +127,7 @@ if len(web_page_list) == 0:\n
web_page_list = portal_catalog(reference=name_without_web_site,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......@@ -139,7 +139,7 @@ if len(web_page_list) == 0:\n
web_page_list = portal_catalog(reference=name_without_portal_type,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......@@ -151,7 +151,7 @@ if len(web_page_list) == 0:\n
web_page_list = portal_catalog(reference=name_without_portal_type_and_web_site,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......@@ -163,7 +163,7 @@ if len(web_page_list) == 0:\n
web_page_list = portal_catalog(reference=name_without_web_site_and_view,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......@@ -176,7 +176,7 @@ if len(web_page_list) == 0:\n
web_page_list = portal_catalog(reference=state,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
limit=1,\n
**kw)\n
......
458
\ No newline at end of file
459
\ No newline at end of file
......@@ -94,7 +94,7 @@ web_page_list = portal_catalog(reference=name,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
language=language,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
**kw)\n
\n
......@@ -104,7 +104,7 @@ if len(web_page_list) == 0 and language != \'en\':\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
language=\'en\',\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
**kw)\n
\n
......@@ -113,7 +113,7 @@ if len(web_page_list) == 0:\n
web_page_list = portal_catalog(reference=name,\n
portal_type=valid_portal_type_list,\n
validation_state=validation_state,\n
order_by=[(\'version\', \'descending\')],\n
sort_on=[(\'version\', \'descending\')],\n
group_by=(\'reference\',),\n
**kw)\n
\n
......
837
\ No newline at end of file
838
\ No newline at end of file
......@@ -769,7 +769,7 @@ class Document(PermanentURLMixIn, XMLObject, UrlMixIn, ConversionCacheMixin, Sna
catalog = getToolByName(self, 'portal_catalog', None)
kw = dict(portal_type=self.getPortalType(),
reference=self.getReference(),
order_by=(('version', 'descending', 'SIGNED'),)
sort_on=(('version', 'descending', 'SIGNED'),)
)
if version: kw['version'] = version
if language: kw['language'] = language
......
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