diff MoinMoin/themes/__init__.py @ 2217:431815d4f4a6

Fixed interwiki patch to deal with new composite name.
author Ashutosh Singla <ashu1461@gmail.com>
date Sun, 30 Jun 2013 02:23:16 +0530
parents ad303592c64c
children 09a9bffa1581
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sun Jun 30 00:44:47 2013 +0530
+++ b/MoinMoin/themes/__init__.py	Sun Jun 30 02:23:16 2013 +0530
@@ -105,9 +105,9 @@
         breadcrumbs = []
         trail = user.get_trail()
         for interwiki_item_name in trail:
-            wiki_name, namespace, item_name = split_interwiki(interwiki_item_name)
+            wiki_name, namespace, field, item_name = split_interwiki(interwiki_item_name)
             err = not is_known_wiki(wiki_name)
-            href = url_for_item(item_name, namespace=namespace, wiki_name=wiki_name)
+            href = url_for_item(item_name, namespace=namespace, wiki_name=wiki_name, field=field)
             if is_local_wiki(wiki_name):
                 exists = self.storage.has_item(item_name)
                 wiki_name = ''  # means "this wiki" for the theme code
@@ -191,10 +191,10 @@
         if target.startswith("wiki:"):
             target = target[5:]
 
-        wiki_name, namespace, item_name = split_interwiki(target)
+        wiki_name, namespace, field, item_name = split_interwiki(target)
         if wiki_name == 'Self':
             wiki_name = ''
-        href = url_for_item(item_name, namespace=namespace, wiki_name=wiki_name)
+        href = url_for_item(item_name, namespace=namespace, wiki_name=wiki_name, field=field)
         if not title:
             title = item_name
         return href, title, wiki_name