changeset 4571:41f1c2922ae7

fixed missing API changes of request.getScriptname() to request.url_root
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 12 Feb 2009 15:20:27 +0100
parents e86a7b66eb0e
children 30cc750e28b4
files MoinMoin/action/backup.py MoinMoin/action/sitemap.py MoinMoin/script/migration/wikiutil160a.py MoinMoin/userprefs/oidserv.py
diffstat 4 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/backup.py	Wed Feb 11 02:38:25 2009 +0100
+++ b/MoinMoin/action/backup.py	Thu Feb 12 15:20:27 2009 +0100
@@ -74,7 +74,7 @@
 <input type="submit" value="%(backup_button)s">
 </form>
 """ % {
-    'baseurl': request.getScriptname(),
+    'baseurl': request.url_root,
     'pagename': wikiutil.quoteWikinameURL(pagename),
     'backup_button': _('Backup'),
 })
--- a/MoinMoin/action/sitemap.py	Wed Feb 11 02:38:25 2009 +0100
+++ b/MoinMoin/action/sitemap.py	Thu Feb 12 15:20:27 2009 +0100
@@ -73,7 +73,7 @@
     result.append("""<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">\n""")
 
     # we include the root url as an important and often changed URL
-    rooturl = request.getScriptname()
+    rooturl = request.url_root
     if not rooturl.endswith('/'):
         rooturl += '/'
     result.append(make_url_xml(request, {
--- a/MoinMoin/script/migration/wikiutil160a.py	Wed Feb 11 02:38:25 2009 +0100
+++ b/MoinMoin/script/migration/wikiutil160a.py	Thu Feb 12 15:20:27 2009 +0100
@@ -544,7 +544,7 @@
         for line in lines:
             if not line or line[0] == '#': continue
             try:
-                line = "%s %s/InterWiki" % (line, request.getScriptname())
+                line = "%s %s/InterWiki" % (line, request.url_root)
                 wikitag, urlprefix, dummy = line.split(None, 2)
             except ValueError:
                 pass
@@ -554,9 +554,9 @@
         del lines
 
         # add own wiki as "Self" and by its configured name
-        _interwiki_list['Self'] = request.getScriptname() + '/'
+        _interwiki_list['Self'] = request.url_root + '/'
         if request.cfg.interwikiname:
-            _interwiki_list[request.cfg.interwikiname] = request.getScriptname() + '/'
+            _interwiki_list[request.cfg.interwikiname] = request.url_root + '/'
 
         # save for later
         request.cfg.cache.interwiki_list = _interwiki_list
@@ -615,7 +615,7 @@
     if _interwiki_list.has_key(wikiname):
         return (wikiname, _interwiki_list[wikiname], pagename, False)
     else:
-        return (wikiname, request.getScriptname(), "/InterWiki", True)
+        return (wikiname, request.url_root, "/InterWiki", True)
 
 def join_wiki(wikiurl, wikitail):
     """
@@ -1522,7 +1522,7 @@
     if text is None:
         text = params # default
     if formatter:
-        url = "%s/%s" % (request.getScriptname(), params)
+        url = "%s/%s" % (request.url_root, params)
         # formatter.url will escape the url part
         if on is not None:
             tag = formatter.url(on, url, css_class, **kw)
@@ -1541,7 +1541,7 @@
                 attrs += ' id="%s"' % id
             if name:
                 attrs += ' name="%s"' % name
-            tag = '<a%s href="%s/%s">' % (attrs, request.getScriptname(), params)
+            tag = '<a%s href="%s/%s">' % (attrs, request.url_root, params)
             if not on:
                 tag = "%s%s</a>" % (tag, text)
         request.log("Warning: wikiutil.link_tag called without formatter and without request.html_formatter. tag=%r" % (tag, ))
--- a/MoinMoin/userprefs/oidserv.py	Wed Feb 11 02:38:25 2009 +0100
+++ b/MoinMoin/userprefs/oidserv.py	Thu Feb 12 15:20:27 2009 +0100
@@ -61,7 +61,7 @@
             return self._handle_remove()
 
     def _make_form(self):
-        sn = self.request.getScriptname()
+        sn = self.request.url_root
         pi = self.request.getPathinfo()
         action = u"%s%s" % (sn, pi)
         _form = html.FORM(action=action)