changeset 1776:fc75423e26a8

remove unneeded request param from page.split_title()
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 18 Feb 2007 21:17:16 +0100
parents ec3625137c0d
children ed44b93599b5
files MoinMoin/Page.py MoinMoin/PageEditor.py MoinMoin/PageGraphicalEditor.py MoinMoin/action/info.py MoinMoin/macro/Include.py MoinMoin/theme/classic.py
diffstat 6 files changed, 9 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sun Feb 18 20:54:24 2007 +0100
+++ b/MoinMoin/Page.py	Sun Feb 18 21:17:16 2007 +0100
@@ -386,7 +386,7 @@
 
         return self.getPageStatus(*args, **kw)[1]
 
-    def split_title(self, request, force=0):
+    def split_title(self, force=0):
         """
         Return a string with the page name split by spaces, if
         the user wants that.
@@ -396,6 +396,7 @@
         @rtype: unicode
         @return: pagename of this page, splitted into space separated words
         """
+        request = self.request
         if not force and not request.user.wikiname_add_spaces:
             return self.page_name
 
@@ -768,7 +769,7 @@
         @return: formatted link
         """
         if not text:
-            text = self.split_title(request)
+            text = self.split_title()
         text = wikiutil.escape(text)
 
         # Add css class for non existing page
@@ -1111,7 +1112,7 @@
                     request.user.addTrail(self.page_name)
                     trail = request.user.getTrail()
 
-                title = self.split_title(request)
+                title = self.split_title()
 
                 request.theme.send_title(title, page=self, msg=msg,
                                     pagename=self.page_name, print_mode=print_mode,
--- a/MoinMoin/PageEditor.py	Sun Feb 18 20:54:24 2007 +0100
+++ b/MoinMoin/PageEditor.py	Sun Feb 18 21:17:16 2007 +0100
@@ -299,7 +299,7 @@
         status = Status(request, content=status)
 
         request.theme.send_title(
-            title % {'pagename': self.split_title(request), },
+            title % {'pagename': self.split_title(), },
             page=self,
             pagename=self.page_name, msg=status,
             html_head=self.lock.locktype and (
--- a/MoinMoin/PageGraphicalEditor.py	Sun Feb 18 20:54:24 2007 +0100
+++ b/MoinMoin/PageGraphicalEditor.py	Sun Feb 18 21:17:16 2007 +0100
@@ -202,7 +202,7 @@
         status = Status(request, content=status)
 
         request.theme.send_title(
-            title % {'pagename': self.split_title(request), },
+            title % {'pagename': self.split_title(), },
             page=self,
             pagename=self.page_name, msg=status,
             html_head=self.lock.locktype and (
--- a/MoinMoin/action/info.py	Sun Feb 18 20:54:24 2007 +0100
+++ b/MoinMoin/action/info.py	Sun Feb 18 21:17:16 2007 +0100
@@ -201,7 +201,7 @@
     # main function
     _ = request.getText
     page = Page(request, pagename)
-    title = page.split_title(request)
+    title = page.split_title()
 
     request.emit_http_headers()
 
--- a/MoinMoin/macro/Include.py	Sun Feb 18 20:54:24 2007 +0100
+++ b/MoinMoin/macro/Include.py	Sun Feb 18 21:17:16 2007 +0100
@@ -181,7 +181,7 @@
         # do headings
         level = None
         if args.group('heading') and args.group('hquote'):
-            heading = args.group('htext') or inc_page.split_title(request)
+            heading = args.group('htext') or inc_page.split_title()
             level = 1
             if args.group('level'):
                 level = int(args.group('level'))
--- a/MoinMoin/theme/classic.py	Sun Feb 18 20:54:24 2007 +0100
+++ b/MoinMoin/theme/classic.py	Sun Feb 18 21:17:16 2007 +0100
@@ -192,7 +192,7 @@
             for action in available:
                 # Always add spaces: AttachFile -> Attach File 
                 # XXX TODO do not make a page object just for split_title
-                title = Page(request, action).split_title(request, force=1)
+                title = Page(request, action).split_title(force=1)
                 # Use translated version if available
                 title = _(title, formatted=False)
                 querystr = {'action': action}