changeset 1358:b9fee7c455be

fix redirects, must have absolute path
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Aug 2006 21:54:26 +0200
parents 43a3a1ec471c
children c9dd061b932c
files MoinMoin/action/RenamePage.py MoinMoin/action/RenderAsDocbook.py MoinMoin/action/__init__.py MoinMoin/action/fullsearch.py MoinMoin/action/newpage.py
diffstat 5 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/RenamePage.py	Sun Aug 20 21:22:53 2006 +0200
+++ b/MoinMoin/action/RenamePage.py	Sun Aug 20 21:54:26 2006 +0200
@@ -54,7 +54,7 @@
 
     def do_action_finish(self, success):
         if success:
-            url = Page(self.request, self.newpagename).url(self.request)
+            url = Page(self.request, self.newpagename).url(self.request, escape=0, relative=False)
             self.request.http_redirect(url)
             self.request.finish()
         else:
--- a/MoinMoin/action/RenderAsDocbook.py	Sun Aug 20 21:22:53 2006 +0200
+++ b/MoinMoin/action/RenderAsDocbook.py	Sun Aug 20 21:54:26 2006 +0200
@@ -8,6 +8,6 @@
 from MoinMoin.Page import Page
 
 def execute(pagename, request):
-    url = Page(request, pagename).url(request, {'action': 'show', 'mimetype': 'text/docbook'}, escape=0)
+    url = Page(request, pagename).url(request, {'action': 'show', 'mimetype': 'text/docbook'}, escape=0, relative=False)
     request.http_redirect(url)
 
--- a/MoinMoin/action/__init__.py	Sun Aug 20 21:22:53 2006 +0200
+++ b/MoinMoin/action/__init__.py	Sun Aug 20 21:54:26 2006 +0200
@@ -277,7 +277,7 @@
 def do_goto(pagename, request):
     """ redirect to another page """
     target = request.form.get('target', [''])[0]
-    request.http_redirect(Page(request, target).url(request, escape=0))
+    request.http_redirect(Page(request, target).url(request, escape=0, relative=False))
 
 def do_userform(pagename, request):
     """ save data posted from UserPreferences """
--- a/MoinMoin/action/fullsearch.py	Sun Aug 20 21:22:53 2006 +0200
+++ b/MoinMoin/action/fullsearch.py	Sun Aug 20 21:54:26 2006 +0200
@@ -76,8 +76,7 @@
         page = results.hits[0]
         if not page.attachment: # we did not find an attachment
             page = Page(request, page.page_name)
-            # TODO: remove escape=0 in 2.0
-            url = page.url(request, querystr={'highlight': query.highlight_re()}, escape=0)
+            url = page.url(request, querystr={'highlight': query.highlight_re()}, escape=0, relative=False)
             request.http_redirect(url)
             return
 
--- a/MoinMoin/action/newpage.py	Sun Aug 20 21:22:53 2006 +0200
+++ b/MoinMoin/action/newpage.py	Sun Aug 20 21:54:26 2006 +0200
@@ -89,7 +89,7 @@
             if parent:
                 pagename = "%s/%s" % (parent, pagename)
 
-            url = Page(self.request, pagename).url(self.request, query, escape=0)
+            url = Page(self.request, pagename).url(self.request, query, escape=0, relative=False)
             self.request.http_redirect(url)
 
         return ''