changeset 1906:4c424f7b5d55

fix double content div for MissingPage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 23 Mar 2007 22:20:11 +0100
parents 60a6dd88624a
children 3799c27e664a
files MoinMoin/Page.py
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Thu Mar 22 22:59:45 2007 +0100
+++ b/MoinMoin/Page.py	Fri Mar 23 22:20:11 2007 +0100
@@ -1104,14 +1104,11 @@
         # Load the parser
         Parser = wikiutil.searchAndImportPlugin(request.cfg, "parser", pi['format'])
 
-        # start wiki content div
-        request.write(self.formatter.startContent(content_id))
-
         # new page?
         if not page_exists and (not content_only or (content_only
                                                      and send_missing_page)):
             if self.default_formatter and not content_only:
-                self._emptyPageText(request)
+                self._emptyPageText(request) # this recursively calls send_page
             elif content_only and send_missing_page:
                 # We should send MissingPage but it is not there
                 import warnings
@@ -1123,6 +1120,9 @@
         elif not request.user.may.read(self.page_name):
             request.write("<strong>%s</strong><br>" % _("You are not allowed to view this page."))
         else:
+            # start wiki content div
+            request.write(self.formatter.startContent(content_id))
+
             # parse the text and send the page content
             self.send_page_content(request, Parser, body,
                                    format_args=pi['formatargs'],
@@ -1134,8 +1134,8 @@
                 from MoinMoin.macro.FootNote import emit_footnotes
                 request.write(emit_footnotes(request, self.formatter))
 
-        # end wiki content div
-        request.write(self.formatter.endContent())
+            # end wiki content div
+            request.write(self.formatter.endContent())
 
         # end document output
         if not content_only: