changeset 4229:c60dee8f45be

Fixed docbook rendering (and obviously several other problems that didn't show in tests)
author Florian Krupicka <florian.krupicka@googlemail.com>
date Sat, 19 Jul 2008 01:35:07 +0200
parents d9b3c6585585
children 2074c2204d03
files MoinMoin/action/RenderAsDocbook.py MoinMoin/action/__init__.py MoinMoin/formatter/text_docbook.py
diffstat 3 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/RenderAsDocbook.py	Fri Jul 18 23:08:48 2008 +0200
+++ b/MoinMoin/action/RenderAsDocbook.py	Sat Jul 19 01:35:07 2008 +0200
@@ -4,10 +4,12 @@
     @copyright: 2005 MoinMoin:AlexanderSchremmer
     @license: GNU GPL, see COPYING for details.
 """
+from werkzeug.exceptions import abort
+from werkzeug.utils import redirect
 
 from MoinMoin.Page import Page
 
 def execute(pagename, request):
     url = Page(request, pagename).url(request, {'action': 'show', 'mimetype': 'text/docbook'})
-    request.http_redirect(url)
+    return abort(redirect(url))
 
--- a/MoinMoin/action/__init__.py	Fri Jul 18 23:08:48 2008 +0200
+++ b/MoinMoin/action/__init__.py	Sat Jul 19 01:35:07 2008 +0200
@@ -246,7 +246,7 @@
         Page(request, pagename).send_page()
     else:
         from MoinMoin.web.contexts import HTTPContext, RenderContext
-        mimetype = request.form.get('mimetype', u"text/html")
+        mimetype = request.values.get('mimetype', u"text/html")
         rev = request.rev or 0
         if rev == 0:
             request.cacheable = cacheable
@@ -317,17 +317,17 @@
         config.cache.action_names = actions # remember it
     return config.cache.action_names
 
-def getHandler(request, action, identifier="execute"):
+def getHandler(cfg, action, identifier="execute"):
     """ return a handler function for a given action or None.
 
     TODO: remove request dependency
     """
     # check for excluded actions
-    if action in request.cfg.actions_excluded:
+    if action in cfg.actions_excluded:
         return None
 
     try:
-        handler = wikiutil.importPlugin(request.cfg, "action", action, identifier)
+        handler = wikiutil.importPlugin(cfg, "action", action, identifier)
     except wikiutil.PluginMissingError:
         handler = globals().get('do_' + action)
 
@@ -363,7 +363,6 @@
                 # Prevent modification of underlay only pages, or pages
                 # the user can't write and can't delete
                 excluded = [u'RenamePage', u'DeletePage', ] # AttachFile must NOT be here!
-
         return set(action for action in actions if not action in excluded)
 
 
--- a/MoinMoin/formatter/text_docbook.py	Fri Jul 18 23:08:48 2008 +0200
+++ b/MoinMoin/formatter/text_docbook.py	Sat Jul 19 01:35:07 2008 +0200
@@ -364,7 +364,7 @@
     def url(self, on, url=None, css=None, **kw):
         if url and url.startswith("/"):
             # convert to absolute path:
-            url = "%s%s"%(self.request.getBaseURL(), url)
+            url = "%s%s"%(self.request.base_url, url)
 
         if not on:
             self._cleanupUlinkNode()