Commit a7d966a8 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Bug fix.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4952 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 80a7b15e
...@@ -42,7 +42,10 @@ class XMLMatrix(Folder): ...@@ -42,7 +42,10 @@ class XMLMatrix(Folder):
XXX plusieurs matrice associes un identifiant (base_id), le nombre de dimensions est indpandant. Les indexs de la matrice sont des objets. XXX plusieurs matrice associes un identifiant (base_id), le nombre de dimensions est indpandant. Les indexs de la matrice sont des objets.
A mix-in class which provides a matrix like A mix-in class which provides a matrix like
access to objects. Matrices are of any dimension access to objects. Matrices are of any dimension.
A single XMLMatrix may contain multiple matrices,
of different dimension. Each matrix is associated to
a so-called 'base_id'.
We still must make XMLMatrix a subclass of Base so We still must make XMLMatrix a subclass of Base so
that we can inherit from ExtensionClass.Base that we can inherit from ExtensionClass.Base
...@@ -104,10 +107,10 @@ class XMLMatrix(Folder): ...@@ -104,10 +107,10 @@ class XMLMatrix(Folder):
if not hasattr(self, 'index'): if not hasattr(self, 'index'):
return 0 return 0
base_id= kwd.get('base_id', "cell")
if not self.index.has_key(base_id): if not self.index.has_key(base_id):
return 0 return 0
base_id= kwd.get('base_id', "cell")
cell_id = base_id cell_id = base_id
i = 0 i = 0
for my_id in kw: for my_id in kw:
...@@ -496,7 +499,8 @@ class XMLMatrix(Folder): ...@@ -496,7 +499,8 @@ class XMLMatrix(Folder):
security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' ) security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent' )
def newCellContent(self, id, portal_type=None, **kw): def newCellContent(self, id, portal_type=None, **kw):
""" """
Creates a new content as a cell. Creates a new content as a cell. This method is
meant to be overriden by subclasses.
""" """
if portal_type is not None : if portal_type is not None :
type_name = portal_type type_name = portal_type
......
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