changeset 2706:d2d4e74978bd

remove superfluous request parameter from AbsPageName/RelPageName
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 21 Aug 2007 18:47:29 +0200
parents 4a4d84273ae1
children 2d93b9a28ea3 4c95862bf9ef
files MoinMoin/_tests/test_wikiutil.py MoinMoin/formatter/text_html.py MoinMoin/macro/Include.py MoinMoin/parser/text_rst.py MoinMoin/script/migration/_conv160_wiki.py MoinMoin/wikiutil.py
diffstat 6 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_wikiutil.py	Tue Aug 21 18:40:59 2007 +0200
+++ b/MoinMoin/_tests/test_wikiutil.py	Tue Aug 21 18:47:29 2007 +0200
@@ -752,14 +752,14 @@
             yield self._check_abs_pagename, current_page, relative_page, absolute_page
 
     def _check_abs_pagename(self, current_page, relative_page, absolute_page):
-        assert absolute_page == wikiutil.AbsPageName(None, current_page, relative_page)
+        assert absolute_page == wikiutil.AbsPageName(current_page, relative_page)
 
     def test_rel_pagename(self):
         for (current_page, relative_page), absolute_page in self.tests:
             yield self._check_rel_pagename, current_page, absolute_page, relative_page
 
     def _check_rel_pagename(self, current_page, absolute_page, relative_page):
-        assert relative_page == wikiutil.RelPageName(None, current_page, absolute_page)
+        assert relative_page == wikiutil.RelPageName(current_page, absolute_page)
 
 
 coverage_modules = ['MoinMoin.wikiutil']
--- a/MoinMoin/formatter/text_html.py	Tue Aug 21 18:40:59 2007 +0200
+++ b/MoinMoin/formatter/text_html.py	Tue Aug 21 18:47:29 2007 +0200
@@ -489,7 +489,7 @@
                 wikitail, kw['anchor'] = wikitail.split('#', 1)
             wikitail = wikiutil.url_unquote(wikitail)
             try: # XXX this is the only place where we access self.page - do we need it? Crashes silently on actions!
-                pagename = wikiutil.AbsPageName(self.request, self.page.page_name, wikitail)
+                pagename = wikiutil.AbsPageName(self.page.page_name, wikitail)
             except:
                 pagename = wikitail
             return self.pagelink(on, pagename, **kw)
--- a/MoinMoin/macro/Include.py	Tue Aug 21 18:40:59 2007 +0200
+++ b/MoinMoin/macro/Include.py	Tue Aug 21 18:47:29 2007 +0200
@@ -73,7 +73,7 @@
         this_page._macroInclude_pagelist = {}
 
     # get list of pages to include
-    inc_name = wikiutil.AbsPageName(request, this_page.page_name, args.group('name'))
+    inc_name = wikiutil.AbsPageName(this_page.page_name, args.group('name'))
     pagelist = [inc_name]
     if inc_name.startswith("^"):
         try:
--- a/MoinMoin/parser/text_rst.py	Tue Aug 21 18:40:59 2007 +0200
+++ b/MoinMoin/parser/text_rst.py	Tue Aug 21 18:47:29 2007 +0200
@@ -379,7 +379,7 @@
                 anchor = ''
                 if '#' in refuri:
                     pagename, anchor = refuri.split('#', 1)
-                page = Page(self.request, wikiutil.AbsPageName(self.request, self.formatter.page.page_name, pagename))
+                page = Page(self.request, wikiutil.AbsPageName(self.formatter.page.page_name, pagename))
                 node['refuri'] = page.url(self.request, anchor=anchor)
                 if not page.exists():
                     node['classes'].append('nonexistent')
--- a/MoinMoin/script/migration/_conv160_wiki.py	Tue Aug 21 18:40:59 2007 +0200
+++ b/MoinMoin/script/migration/_conv160_wiki.py	Tue Aug 21 18:47:29 2007 +0200
@@ -47,7 +47,7 @@
         """
         current_page = self.pagename
         item_type, page_name, file_name = (key + (None, ))[:3]
-        abs_page_name = wikiutil.AbsPageName(self.request, current_page, page_name)
+        abs_page_name = wikiutil.AbsPageName(current_page, page_name)
         if item_type == 'PAGE':
             item_name = page_name
             key = (item_type, abs_page_name)
--- a/MoinMoin/wikiutil.py	Tue Aug 21 18:40:59 2007 +0200
+++ b/MoinMoin/wikiutil.py	Tue Aug 21 18:47:29 2007 +0200
@@ -830,7 +830,7 @@
     return homewiki, username
 
 
-def AbsPageName(request, context, pagename):
+def AbsPageName(context, pagename):
     """
     Return the absolute pagename for a (possibly) relative pagename.
 
@@ -851,7 +851,7 @@
             pagename = pagename[CHILD_PREFIX_LEN:]
     return pagename
 
-def RelPageName(request, context, pagename):
+def RelPageName(context, pagename):
     """
     Return the relative pagename for some context.