Commit 9c146950 authored by Sebastien Robin's avatar Sebastien Robin

indent of 4 for ERP5CPS


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@577 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1bdface3
...@@ -35,79 +35,68 @@ from zLOG import LOG ...@@ -35,79 +35,68 @@ from zLOG import LOG
class PatchedProxyBase(ProxyBase): class PatchedProxyBase(ProxyBase):
security = ClassSecurityInfo() security = ClassSecurityInfo()
# Object attributes update method
# security.declarePrivate( '_edit' ) def manage_afterEdit(self):
# def _edit(self, REQUEST=None, force_update = 0, **kw): """
# """ We have to notify the proxy tool we have modified
# call also the proxytool this object
# """ """
# Base._edit(self, REQUEST=REQUEST,force_update=force_update, **kw) px_tool= getToolByName(self,'portal_proxies')
# px_tool= getToolByName(self,'portal_proxies') utool = getToolByName(self, 'portal_url')
# utool = getToolByName(self, 'portal_url') rpath = utool.getRelativeUrl(self)
# rpath = utool.getRelativeUrl(self) px_tool._modifyProxy(self,rpath)
# px_tool._modifyProxy(self,rpath)
def manage_afterEdit(self):
""" def _propertyMap(self):
We have to notify the proxy tool we have modified """
this object Returns fake property sheet
""" """
px_tool= getToolByName(self,'portal_proxies') property_sheet = []
utool = getToolByName(self, 'portal_url')
rpath = utool.getRelativeUrl(self) #property_sheet += self._properties
px_tool._modifyProxy(self,rpath)
property_sheet += [
{
'id' : 'docid',
def _propertyMap(self): 'type' : 'string'
""" },
Returns fake property sheet {
""" 'id' : 'default_language',
property_sheet = [] 'type' : 'string'
},
#property_sheet += self._properties {
'id' : 'sync_language_revisions', # XXX we have to manage dict type
property_sheet += [ 'type' : 'dict'
{ }
'id' : 'docid', ]
'type' : 'string' return tuple(property_sheet + list(getattr(self, '_local_properties', ())))
},
{ security.declareProtected(View, 'getSyncLanguageRevisions')
'id' : 'default_language', def getSyncLanguageRevisions(self):
'type' : 'string' """Get the mapping of language -> revision."""
}, return self._language_revs.copy()
{
'id' : 'sync_language_revisions', # XXX we have to manage dict type security.declareProtected(View, 'setSyncLanguageRevisions')
'type' : 'dict' def setSyncLanguageRevisions(self, dict):
} """Set the mapping of language -> revision."""
] for lang in dict.keys():
return tuple(property_sheet + list(getattr(self, '_local_properties', ()))) self.setLanguageRevision(lang,dict[lang])
security.declareProtected(View, 'getSyncLanguageRevisions') security.declareProtected(View, 'getSyncRepoHistory')
def getSyncLanguageRevisions(self): def getSyncRepoHistory(self):
"""Get the mapping of language -> revision.""" """Get the mapping of language -> revision."""
return self._language_revs.copy() return self._language_revs.copy()
security.declareProtected(View, 'setSyncLanguageRevisions') security.declareProtected(View, 'setSyncRepoHistory')
def setSyncLanguageRevisions(self, dict): def setSyncRepoHistory(self, dict):
"""Set the mapping of language -> revision.""" """Set the mapping of language -> revision."""
for lang in dict.keys(): repotool = getToolByName(self, 'portal_repository')
self.setLanguageRevision(lang,dict[lang]) #repotool.
for lang in dict.keys():
security.declareProtected(View, 'getSyncRepoHistory') self.setLanguageRevision(lang,dict[lang])
def getSyncRepoHistory(self):
"""Get the mapping of language -> revision."""
return self._language_revs.copy()
security.declareProtected(View, 'setSyncRepoHistory')
def setSyncRepoHistory(self, dict):
"""Set the mapping of language -> revision."""
repotool = getToolByName(self, 'portal_repository')
#repotool.
for lang in dict.keys():
self.setLanguageRevision(lang,dict[lang])
ProxyBase.getPath = Base.getPath ProxyBase.getPath = Base.getPath
......
This diff is collapsed.
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