fixed wiki for missing body
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.0.9 (2012-10-04 08:44:15) dev
|
Version 2.0.9 (2012-10-04 10:44:23) dev
|
||||||
|
|||||||
+2
-2
@@ -4703,14 +4703,14 @@ class Wiki(object):
|
|||||||
|
|
||||||
def first_paragraph(self,page):
|
def first_paragraph(self,page):
|
||||||
if not self.can_read(page):
|
if not self.can_read(page):
|
||||||
mm = page.body.replace('\r','')
|
mm = (page.body or '').replace('\r','')
|
||||||
ps = [p for p in mm.split('\n\n') \
|
ps = [p for p in mm.split('\n\n') \
|
||||||
if not p.startswith('#') and p.strip()]
|
if not p.startswith('#') and p.strip()]
|
||||||
if ps: return ps[0]
|
if ps: return ps[0]
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def fix_hostname(self,body):
|
def fix_hostname(self,body):
|
||||||
return body.replace('://HOSTNAME','://%s' % self.host)
|
return (body or '').replace('://HOSTNAME','://%s' % self.host)
|
||||||
|
|
||||||
def read(self,slug):
|
def read(self,slug):
|
||||||
if slug in '_cloud':
|
if slug in '_cloud':
|
||||||
|
|||||||
Reference in New Issue
Block a user