wiki implementation for Zope 2 based on generic object access interfaces: basically working

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3612 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2009-10-29 18:54:34 +00:00
parent df079e9955
commit ece6b518aa
2 changed files with 7 additions and 4 deletions

View file

@ -80,9 +80,12 @@ class WikiManager(BaseConfiguration):
return obj
def resolveUid(self, uid):
if isinstance(uid, basestring) and ':' in uid:
protocol, address = uid.split(':', 1)
if protocol.lower() in protocols:
if isinstance(uid, basestring):
if ':' in uid:
protocol, address = uid.split(':', 1)
if protocol.lower() in protocols:
return ExternalPage(uid)
if uid.startswith('/') or '..' in uid:
return ExternalPage(uid)
return None

View file

@ -166,7 +166,7 @@ class WikiPage(BaseWikiPage):
if self.context.getProperty('text') is None:
self.context.manage_addProperty('text', text, 'text')
else:
self.context.manage_changeProperties(id='text', value=text)
self.context.manage_changeProperties(text=text)
text = property(getText, setText)
def getWiki(self):