From fd00128bda1c5e51e95c629e334cc07721424dab Mon Sep 17 00:00:00 2001 From: Christophe Dumez <christophe@nexedi.com> Date: Wed, 9 Aug 2006 15:51:42 +0000 Subject: [PATCH] - Code optimization in OOo important (split relativeUrl instead of full path of a category) git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9114 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_base/ERP5Site_getCategoriesFullPath.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getCategoriesFullPath.xml b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getCategoriesFullPath.xml index 85aca6cd48..f5e34eb34e 100644 --- a/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getCategoriesFullPath.xml +++ b/bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_getCategoriesFullPath.xml @@ -90,13 +90,13 @@ for category_name in category_dict.keys():\n category_object = context.getPortalObject().portal_categories[category_name]\n result_list = context.portal_catalog(portal_type=\'Category\', reference=str(subcat_code), relative_url=category_name+\'%\')\n if len(result_list) != 0:\n - result_cat_fullpath = \'/\'.join(result_list[0].getPath().split(\'/\')[4:])\n + result_cat_fullpath = \'/\'.join(result_list[0].getRelativeUrl().split(\'/\')[1:])\n result_dict[category_name]=result_cat_fullpath\n else:\n # XXX: this request does a LIKE "%xxxx%", We should find a way to remove the %%\n result_list = context.portal_catalog(portal_type=\'Category\', title=str(subcat_code), relative_url=category_name+\'%\')\n if len(result_list) != 0:\n - result_cat_fullpath = \'/\'.join(result_list[0].getPath().split(\'/\')[4:])\n + result_cat_fullpath = \'/\'.join(result_list[0].getRelativeUrl().split(\'/\')[1:])\n result_dict[category_name]=result_cat_fullpath\n #result_cat = getMatchingCategoryUsingCodification(root_category=category_object, codification=subcat_code)\n #if result_cat is not None:\n -- 2.30.9