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 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -103,12 +100,14 @@ args = context.parseSearchString(sstr)\n ...@@ -103,12 +100,14 @@ args = context.parseSearchString(sstr)\n
if not args.has_key(\'portal_type\') or args[\'portal_type\'] == ():\n if not args.has_key(\'portal_type\') or args[\'portal_type\'] == ():\n
args[\'portal_type\'] = context.getPortalDocumentTypeList()\n args[\'portal_type\'] = context.getPortalDocumentTypeList()\n
\n \n
# process searching by category\n ### All document types in DMS do not use any xxx_relative property.\n
cats = []\n ### So, I comment out here. (yusei)\n
bases = context.portal_categories.getBaseCategoryList()\n ## process searching by category\n
for k,v in args.items():\n #cats = []\n
if k in bases:\n #bases = context.portal_categories.getBaseCategoryList()\n
args[k+\'_relative_url\'] = k + \'/\' + v\n #for k,v in args.items():\n
# if k in bases and k!=\'language\':\n
# args[k+\'_relative_url\'] = k + \'/\' + v\n
\n \n
# expand simplified notation of search mode\n # expand simplified notation of search mode\n
#mode = args.get(\'mode\')\n #mode = args.get(\'mode\')\n
...@@ -132,13 +131,13 @@ mt = args.get(\'modification_to\')\n ...@@ -132,13 +131,13 @@ mt = args.get(\'modification_to\')\n
\n \n
wheres = []\n wheres = []\n
if cf:\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 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 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 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 if wheres != []:\n
args[\'where_expression\'] = \' AND \'.join(wheres)\n args[\'where_expression\'] = \' AND \'.join(wheres)\n
\n \n
...@@ -222,11 +221,6 @@ return res\n ...@@ -222,11 +221,6 @@ return res\n
<string>args</string> <string>args</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>_write_</string> <string>_write_</string>
<string>cats</string>
<string>bases</string>
<string>_getiter_</string>
<string>k</string>
<string>v</string>
<string>cf</string> <string>cf</string>
<string>ct</string> <string>ct</string>
<string>mf</string> <string>mf</string>
...@@ -241,6 +235,7 @@ return res\n ...@@ -241,6 +235,7 @@ return res\n
<string>res</string> <string>res</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
<string>_getiter_</string>
<string>doc</string> <string>doc</string>
</tuple> </tuple>
</value> </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 2007-11-16 Yusei
* Fixed Base_showFoundText. selection_name argument is required for listbox. * 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. * Fixed Base_showFoundText. if document contains charactor which utf-8 codec cannot decode, remove it from result.
......
705 707
\ 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