changeset 4448:a0864c9c4752

theme:__init__: fixed and simplified getPragma calls for supplementation
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 30 Nov 2008 14:51:25 +0100
parents 2254e666cea3
children 9c1c823f4111
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sat Nov 29 22:42:52 2008 +0100
+++ b/MoinMoin/theme/__init__.py	Sun Nov 30 14:51:25 2008 +0100
@@ -1153,10 +1153,9 @@
         _ = self.request.getText
         editbar_actions = []
         for editbar_item in self.request.cfg.edit_bar:
-            if editbar_item == 'Discussion':
-                if not self.request.cfg.supplementation_page and self.request.getPragma('supplementation-page', 1) in ('on', '1'):
-                    editbar_actions.append(self.supplementation_page_nameLink(page))
-                elif self.request.cfg.supplementation_page and not self.request.getPragma('supplementation-page', 1) in ('off', '0'):
+            if (editbar_item == 'Discussion' and
+               (self.request.getPragma('supplementation-page', self.request.cfg.supplementation_page)
+                                                   in (True, 1, 'on', '1'))):
                     editbar_actions.append(self.supplementation_page_nameLink(page))
             elif editbar_item == 'Comments':
                 # we just use <a> to get same style as other links, but we add some dummy