simplified syntax in auth.wiki @///function

This commit is contained in:
mdipierro
2012-08-18 18:10:22 -05:00
parent 49a5b3025b
commit 3d1dcd063b
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-08-18 17:50:47) dev
Version 2.00.0 (2012-08-18 18:10:19) dev
+1 -1
View File
@@ -510,7 +510,7 @@ META = '\x06'
LINK = '\x07'
DISABLED_META = '\x08'
LATEX = '<img src="http://chart.apis.google.com/chart?cht=tx&chl=%s" />'
regex_URL=re.compile(r'@\{/(?P<a>\w*)/(?P<c>\w*)/(?P<f>\w*(\.\w+)?)(/(?P<args>[\w\.\-/]+))?\}')
regex_URL=re.compile(r'@/(?P<a>\w*)/(?P<c>\w*)/(?P<f>\w*(\.\w+)?)(/(?P<args>[\w\.\-/]+))?')
regex_env=re.compile(r'@\{(?P<a>[\w\-\.]+?)(\:(?P<b>.*?))?\}')
regex_expand_meta = re.compile('('+META+'|'+DISABLED_META+')')
regex_dd=re.compile(r'\$\$(?P<latex>.*?)\$\$')
+2 -2
View File
@@ -4653,7 +4653,7 @@ class Wiki(object):
page = db.wiki_page(slug=slug)
if not (page and self.can_edit(page)): return self.not_authorized(page)
self.auth.db.wiki_media.id.represent = lambda id,row:\
SPAN('@{////%i/%s.%s}' % \
SPAN('@////%i/%s.%s' % \
(id,IS_SLUG.urlify(row.title.split('.')[0]),
row.file.split('.')[-1]))
self.auth.db.wiki_media.wiki_page.default = page.id
@@ -4676,7 +4676,7 @@ class Wiki(object):
return dict(content=form)
def pages(self):
if not self.can_manage(): return self.not_authorized()
self.auth.db.wiki_page.id.represent = lambda id,row:SPAN('@{////%s}' % row.slug)
self.auth.db.wiki_page.id.represent = lambda id,row:SPAN('@////%s' % row.slug)
self.auth.db.wiki_page.title.represent = lambda title,row: \
A(title,_href=URL(args=row.slug))
content=SQLFORM.grid(