diff MoinMoin/themes/__init__.py @ 1286:d2704c2a8d39 namespaces

meta NAME and User.name is always a list of unicode names add a User.name0 property that returns name[0] (or "anonymous") TODO: permissions check still uses only user.name0
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 04 Mar 2012 01:30:58 +0100
parents f5e17549eda3
children 005e12de8b6a
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sat Mar 03 22:09:16 2012 +0100
+++ b/MoinMoin/themes/__init__.py	Sun Mar 04 01:30:58 2012 +0100
@@ -139,7 +139,7 @@
         :returns: arguments of user homepage link in tuple (wiki_href, display_name, title, exists)
         """
         user = self.user
-        name = user.name
+        name = user.name0
         display_name = user.display_name or name
         wikiname, itemname = getInterwikiHome(name)
         title = "{0} @ {1}".format(display_name, wikiname)
@@ -307,7 +307,7 @@
     userid = meta.get(USERID)
     if userid:
         u = user.User(userid)
-        name = u.name[0]
+        name = u.name0
         text = name
         display_name = u.display_name or name
         if title: