Commit 5a826a46 authored by Łukasz Nowak's avatar Łukasz Nowak

- simplification, naming convention (thanks jm)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27630 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f3c4b720
......@@ -145,16 +145,13 @@ class BusinessPath(Path):
TBD - look at CategoryTool._buildFilter for inspiration
"""
filtered_category_list = []
for cat in category_list:
for local_category in category_list:
# basic filtering, dirty way:
# - remove categories, which are not defined in category parameter
# - support base parameter
base_cat, base_value = cat.split('/')[0] , '/'.join(cat.split('/')[1:])
if base_cat == category:
value = base_value
if base == 1:
value = '/'.join([base_cat, value])
filtered_category_list.append(value)
base_category, base_value = local_category.split('/', 1)
if base_category == category:
filtered_category_list.append(base == 1 and local_category or base_value)
return filtered_category_list
# Dynamic context based categories
......
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