diff MoinMoin/script/migration/_conv160_wiki.py @ 2742:0f16bcbc0344

1.6 converter: fix wiki:/localsubpage case
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Tue, 21 Aug 2007 14:53:12 +0200
parents 63ae36c70930
children 4c95862bf9ef
line wrap: on
line diff
--- a/MoinMoin/script/migration/_conv160_wiki.py	Tue Aug 21 14:30:56 2007 +0200
+++ b/MoinMoin/script/migration/_conv160_wiki.py	Tue Aug 21 14:53:12 2007 +0200
@@ -185,8 +185,11 @@
         scheme, url = url.split(':', 1)
         wikiname, pagename = wikiutil.split_wiki(url)
         if (url.startswith(wikiutil.CHILD_PREFIX) or # fancy link to subpage [wiki:/SubPage text]
-            wikiname in ('Self', self.request.cfg.interwikiname, '') or # [wiki:Self:LocalPage text] or [:LocalPage:text]
             Page(self.request, url).exists()): # fancy link to local page [wiki:LocalPage text]
+            pagename = wikiutil.url_unquote(url)
+            pagename = self._replace_target(pagename)
+            return '[[%s%s]]' % (pagename, text)
+        if wikiname in ('Self', self.request.cfg.interwikiname, ''): # [wiki:Self:LocalPage text] or [:LocalPage:text]
             pagename = wikiutil.url_unquote(pagename)
             pagename = self._replace_target(pagename)
             return '[[%s%s]]' % (pagename, text)