diff MoinMoin/themes/__init__.py @ 2236:5f2fb2d7ed87

Replaced a single item_root to namespace-root mapping to add support for namespace specific redirecting.
author Ashutosh Singla <ashu1461@gmail.com>
date Tue, 06 Aug 2013 17:36:48 +0530
parents 33c700bfce29
children ecd43cdbb9b6
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sun Aug 04 01:05:33 2013 +0530
+++ b/MoinMoin/themes/__init__.py	Tue Aug 06 17:36:48 2013 +0530
@@ -23,6 +23,7 @@
 from MoinMoin.i18n import _, L_, N_
 from MoinMoin import wikiutil, user
 from MoinMoin.constants.keys import USERID, ADDRESS, HOSTNAME, REVID, ITEMID, NAME_EXACT
+from MoinMoin.constants.namespaces import NAMESPACE_DEFAULT
 from MoinMoin.search import SearchForm
 from MoinMoin.util.interwiki import split_interwiki, getInterwikiHome, is_local_wiki, is_known_wiki, url_for_item, CompositeName, split_fqname
 from MoinMoin.util.crypto import cache_key
@@ -228,7 +229,7 @@
         for cls, endpoint, args, link_text, title in self.cfg.navi_bar:
             if endpoint == "frontend.show_root":
                 endpoint = "frontend.show_item"
-                args['item_name'] = app.cfg.item_root
+                args['item_name'] = app.cfg.root_mapping.get(NAMESPACE_DEFAULT, app.cfg.default_root)
             items.append((cls, url_for(endpoint, **args), link_text, title))
 
         # Add user links to wiki links.