Commit 06144d90 authored by Jérome Perrin's avatar Jérome Perrin

fix the usual problem of searching for "project_module/x%" that also matches "project_module/xxx"

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37358 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c8725198
...@@ -71,7 +71,7 @@ for category in category_list:\n ...@@ -71,7 +71,7 @@ for category in category_list:\n
sub_category_list = [category]\n sub_category_list = [category]\n
while sub_category_list:\n while sub_category_list:\n
sub_category = sub_category_list.pop()\n sub_category = sub_category_list.pop()\n
membership_criterion_category.append(\'source_project/%s\' % sub_category.getRelativeUrl())\n membership_criterion_category.append(\'source_project/%s/\' % sub_category.getRelativeUrl())\n
sub_category_list.extend(sub_category.contentValues(portal_type=\'Project Line\'))\n sub_category_list.extend(sub_category.contentValues(portal_type=\'Project Line\'))\n
\n \n
domain.edit(title = category.getTitle(),\n domain.edit(title = category.getTitle(),\n
......
...@@ -69,7 +69,7 @@ params = portal.portal_selections.getSelectionParamsFor(selection_name, request) ...@@ -69,7 +69,7 @@ params = portal.portal_selections.getSelectionParamsFor(selection_name, request)
object_path = request.get(\'object_path\')\n object_path = request.get(\'object_path\')\n
if object_path is None:\n if object_path is None:\n
object_path = context.REQUEST.get(\'URL1\').split(\'/\')[-1]\n object_path = context.REQUEST.get(\'URL1\').split(\'/\')[-1]\n
search_path = \'\'.join(["%project_module/", object_path,"%"])\n search_path = \'project_module/%s/%%\' % object_path\n
category_list = []\n category_list = []\n
\n \n
year = here.getStartDate().year()\n year = here.getStartDate().year()\n
......
...@@ -59,7 +59,7 @@ object_path = request.get(\'object_path\')\n ...@@ -59,7 +59,7 @@ object_path = request.get(\'object_path\')\n
if object_path is None:\n if object_path is None:\n
object_path = context.REQUEST.get(\'URL1\').split(\'/\')[-1]\n object_path = context.REQUEST.get(\'URL1\').split(\'/\')[-1]\n
\n \n
search_path = \'\'.join(["%project_module/", object_path,"%"])\n search_path = \'project_module/%s/%%\'\n
\n \n
if depth == 0:\n if depth == 0:\n
category_list = []\n category_list = []\n
......
767 768
\ 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