[preferences] support dot (.) in registry id of configurable appobjects stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 18 May 2010 14:24:04 +0200
branchstable
changeset 5535 b32b8f56192a
parent 5534 b75aa6ce0c04
child 5536 b7fba311e8d0
[preferences] support dot (.) in registry id of configurable appobjects
web/views/cwproperties.py
--- a/web/views/cwproperties.py	Tue May 18 10:30:34 2010 +0200
+++ b/web/views/cwproperties.py	Tue May 18 14:24:04 2010 +0200
@@ -121,9 +121,11 @@
         # user's preference but not site's configuration
         for key in vreg.user_property_keys(self.__regid__=='systempropertiesform'):
             parts = key.split('.')
-            if parts[0] in vreg:
+            if parts[0] in vreg and len(parts) >= 3:
                 # appobject configuration
-                reg, oid, propid = parts
+                reg = parts[0]
+                propid = parts[-1]
+                oid = '.'.join(parts[1:-1])
                 groupedopts.setdefault(reg, {}).setdefault(oid, []).append(key)
             else:
                 mainopts.setdefault(parts[0], []).append(key)