changeset 1745:58a70ba872d6

theme/__init__: minor optimizations
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 14 Jan 2007 01:21:03 +0100
parents f4ead22f4a0e
children b7e0a36a1219
files MoinMoin/theme/__init__.py
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sun Jan 14 00:50:52 2007 +0100
+++ b/MoinMoin/theme/__init__.py	Sun Jan 14 01:21:03 2007 +0100
@@ -1056,12 +1056,10 @@
         editbar_actions = []
         for editbar_item in self.request.cfg.edit_bar:
              if editbar_item == 'Discussion':
-                 if self.request.cfg.supplementation_page is False:
-                     if self.request.getPragma('supplementation-page', 1) in ['on', '1']:
-                         editbar_actions.append(self.supplementation_page_nameLink(page))
-                 elif self.request.cfg.supplementation_page is True:
-                     if not self.request.getPragma('supplementation-page', 1) in ['off', '0']:
-                         editbar_actions.append(self.supplementation_page_nameLink(page))
+                 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'):
+                     editbar_actions.append(self.supplementation_page_nameLink(page))
              elif editbar_item == 'Edit':
                   editbar_actions.append(self.editorLink(page))
              elif editbar_item == 'Info':