From ea01ec0f0e5f70aebbedfc8d35378221321d40b6 Mon Sep 17 00:00:00 2001 From: Massimo Date: Fri, 18 Jan 2013 09:05:39 -0600 Subject: [PATCH] fixed issue 1289, fixed wiki templates, thanks Alan --- VERSION | 2 +- gluon/tools.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 8fb8ecd6..41ce4266 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.1-alpha.2+timestamp.2013.01.17.17.32.33 +Version 2.4.1-alpha.2+timestamp.2013.01.18.09.04.49 diff --git a/gluon/tools.py b/gluon/tools.py index 388c1178..b114c189 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -4762,10 +4762,8 @@ class Wiki(object): perms = self.manage_permissions = manage_permissions self.restrict_search = restrict_search self.extra = extra or {} - if templates is None and not manage_permissions: - templates = db.auth_wiki.tags.contains('template')&\ - db.auth_wiki.can_read.contains('everybody') self.templates = templates + table_definitions = [ ('wiki_page', { 'args':[ @@ -4817,6 +4815,10 @@ class Wiki(object): args += value['args'] db.define_table(key, *args, **value['vars']) + if self.templates is None and not self.manage_permissions: + self.templates = db.wiki_page.tags.contains('template')&\ + db.wiki_page.can_read.contains('everybody') + def update_tags_insert(page, id, db=db): for tag in page.tags or []: tag = tag.strip().lower()