changeset 618:e0cbf33ff15c

remove MoinMoinNoFooter (not needed and more), please call theme.send_closing_html() for closing what send_title() opened
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 05 May 2006 13:46:34 +0200
parents cf420addd95c
children 0bb6b767baec
files MoinMoin/action/PackagePages.py MoinMoin/action/RenderAsDocbook.py MoinMoin/action/fullsearch.py MoinMoin/action/newpage.py MoinMoin/request.py MoinMoin/util/__init__.py MoinMoin/wikiaction.py
diffstat 7 files changed, 15 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/PackagePages.py	Fri May 05 13:31:08 2006 +0200
+++ b/MoinMoin/action/PackagePages.py	Fri May 05 13:46:34 2006 +0200
@@ -17,7 +17,6 @@
 from MoinMoin import wikiutil, config, user
 from MoinMoin.PageEditor import PageEditor
 from MoinMoin.Page import Page
-from MoinMoin.util import MoinMoinNoFooter
 from MoinMoin.action.AttachFile import _addLogEntry
 from MoinMoin.packages import MOIN_PACKAGE_FILE, packLine, unpackLine
 
--- a/MoinMoin/action/RenderAsDocbook.py	Fri May 05 13:31:08 2006 +0200
+++ b/MoinMoin/action/RenderAsDocbook.py	Fri May 05 13:46:34 2006 +0200
@@ -6,10 +6,9 @@
 """
 
 from MoinMoin.Page import Page
-from MoinMoin.util import MoinMoinNoFooter
 
 def execute(pagename, request):
     url = Page(request, pagename).url(request, {'action': 'format',
                                                 'mimetype': 'xml/docbook'}, 0)
     request.http_redirect(url)
-    raise MoinMoinNoFooter
+
--- a/MoinMoin/action/fullsearch.py	Fri May 05 13:31:08 2006 +0200
+++ b/MoinMoin/action/fullsearch.py	Fri May 05 13:46:34 2006 +0200
@@ -10,7 +10,6 @@
 
 from MoinMoin.Page import Page
 from MoinMoin import wikiutil
-from MoinMoin.util import MoinMoinNoFooter
 
 
 def isTitleSearch(request):
@@ -73,7 +72,7 @@
             url = page.url(request, querystr={'highlight': query.highlight_re()},
                            escape=0)
             request.http_redirect(url)
-            raise MoinMoinNoFooter
+            return
 
     # send http headers
     request.http_headers()
--- a/MoinMoin/action/newpage.py	Fri May 05 13:31:08 2006 +0200
+++ b/MoinMoin/action/newpage.py	Fri May 05 13:46:34 2006 +0200
@@ -9,9 +9,8 @@
     @license: GNU GPL, see COPYING for details.
 """
 
-from MoinMoin.util import MoinMoinNoFooter
+import time
 from MoinMoin.Page import Page
-import time
 
 class NewPage:
     """ Open editor for a new page, using template """
@@ -93,7 +92,6 @@
 
             url = Page(self.request, pagename).url(self.request, query, 0)
             self.request.http_redirect(url)
-            raise MoinMoinNoFooter
 
         return ''
 
--- a/MoinMoin/request.py	Fri May 05 13:31:08 2006 +0200
+++ b/MoinMoin/request.py	Fri May 05 13:46:34 2006 +0200
@@ -10,7 +10,14 @@
 import os, re, time, sys, cgi, StringIO
 import copy
 from MoinMoin import config, wikiutil, user, caching
-from MoinMoin.util import MoinMoinNoFooter, IsWin9x
+from MoinMoin.util import IsWin9x
+
+
+# Exceptions -----------------------------------------------------------
+
+class MoinMoinFinish(Exception):
+    """ Raised to jump directly to end of run() function, where finish is called """
+    pass
 
 # Timing ---------------------------------------------------------------
 
@@ -1109,7 +1116,7 @@
             # every action that didn't use to raise MoinMoinNoFooter must call this now:
             # self.theme.send_closing_html()
 
-        except MoinMoinNoFooter:
+        except MoinMoinFinish:
             pass
         except Exception, err:
             self.fail(err)
@@ -1405,7 +1412,7 @@
             
             RequestBase.__init__(self, properties)
 
-        except MoinMoinNoFooter: # might be triggered by http_redirect
+        except MoinMoinFinish: # might be triggered by http_redirect
             self.http_headers() # send headers (important for sending MOIN_ID cookie)
             self.finish()
 
@@ -1507,7 +1514,7 @@
         # calling finish here will send the rest of the data to the next
         # request. leave the finish call to run()
         #self.twistd.finish()
-        raise MoinMoinNoFooter
+        raise MoinMoinFinish
 
     def setResponseCode(self, code, message=None):
         self.twistd.setResponseCode(code, message)
--- a/MoinMoin/util/__init__.py	Fri May 05 13:31:08 2006 +0200
+++ b/MoinMoin/util/__init__.py	Fri May 05 13:46:34 2006 +0200
@@ -46,14 +46,6 @@
 
 
 #############################################################################
-### Exceptions
-#############################################################################
-
-class MoinMoinNoFooter(Exception):
-    """Raised by actions to prevent output of a page footer (with timings)."""
-    pass
-
-#############################################################################
 ### Misc
 #############################################################################
 
--- a/MoinMoin/wikiaction.py	Fri May 05 13:31:08 2006 +0200
+++ b/MoinMoin/wikiaction.py	Fri May 05 13:46:34 2006 +0200
@@ -22,7 +22,7 @@
 import os, re, time
 from MoinMoin import config, util, wikiutil
 from MoinMoin.Page import Page
-from MoinMoin.util import MoinMoinNoFooter, pysupport
+from MoinMoin.util import pysupport
 from MoinMoin.logfile import editlog
 
 #############################################################################
@@ -33,8 +33,6 @@
     """ redirect to another page """
     target = request.form.get('target', [''])[0]
     request.http_redirect(Page(request, target).url(request))
-    request.finish()
-    raise MoinMoinNoFooter
 
 def do_diff(pagename, request):
     """ Handle "action=diff"