Commit 73160d9e authored by Yusei Tahara's avatar Yusei Tahara

2007-11-21 Yusei

* Disable search using xxx_relative_url argument in advanced search, language property is not stored as relation in a document. And fixed ambiguous table name in sql.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17724 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4ce13b11
......@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
......@@ -103,12 +100,14 @@ args = context.parseSearchString(sstr)\n
if not args.has_key(\'portal_type\') or args[\'portal_type\'] == ():\n
args[\'portal_type\'] = context.getPortalDocumentTypeList()\n
\n
# process searching by category\n
cats = []\n
bases = context.portal_categories.getBaseCategoryList()\n
for k,v in args.items():\n
if k in bases:\n
args[k+\'_relative_url\'] = k + \'/\' + v\n
### All document types in DMS do not use any xxx_relative property.\n
### So, I comment out here. (yusei)\n
## process searching by category\n
#cats = []\n
#bases = context.portal_categories.getBaseCategoryList()\n
#for k,v in args.items():\n
# if k in bases and k!=\'language\':\n
# args[k+\'_relative_url\'] = k + \'/\' + v\n
\n
# expand simplified notation of search mode\n
#mode = args.get(\'mode\')\n
......@@ -132,13 +131,13 @@ mt = args.get(\'modification_to\')\n
\n
wheres = []\n
if cf:\n
wheres.append(\'creation_date>"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
wheres.append(\'catalog.creation_date>"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if ct:\n
wheres.append(\'creation_date<"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
wheres.append(\'catalog.creation_date<"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if mf:\n
wheres.append(\'modification_date>"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
wheres.append(\'catalog.modification_date>"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if mt:\n
wheres.append(\'modification_date<"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
wheres.append(\'catalog.modification_date<"\' + cf.strftime(\'%Y-%m-%d\') + \'"\')\n
if wheres != []:\n
args[\'where_expression\'] = \' AND \'.join(wheres)\n
\n
......@@ -222,11 +221,6 @@ return res\n
<string>args</string>
<string>_getitem_</string>
<string>_write_</string>
<string>cats</string>
<string>bases</string>
<string>_getiter_</string>
<string>k</string>
<string>v</string>
<string>cf</string>
<string>ct</string>
<string>mf</string>
......@@ -241,6 +235,7 @@ return res\n
<string>res</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>doc</string>
</tuple>
</value>
......
2007-11-21 Yusei
* Disable search using xxx_relative_url argument in advanced search, language property is not stored as relation in a document. And fixed ambiguous table name in sql.
2007-11-16 Yusei
* Fixed Base_showFoundText. selection_name argument is required for listbox.
* Fixed Base_showFoundText. if document contains charactor which utf-8 codec cannot decode, remove it from result.
......
705
\ No newline at end of file
707
\ 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