changeset 4481:6268799f3966

merged moin/1.7
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 07 Jan 2009 01:30:56 +0100
parents 3f0bc26f3d5a (current diff) af8cea9bfcda (diff)
children dc854677e9bd
files MoinMoin/config/multiconfig.py MoinMoin/theme/__init__.py MoinMoin/user.py
diffstat 4 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Tue Jan 06 20:50:22 2009 +0100
+++ b/MoinMoin/config/multiconfig.py	Wed Jan 07 01:30:56 2009 +0100
@@ -501,8 +501,8 @@
 """
 
         decode_names = (
-            'sitename', 'logo_string', 'navi_bar', 'page_front_page',
-            'page_category_regex', 'page_dict_regex',
+            'sitename', 'interwikiname', 'logo_string', 'navi_bar',
+            'page_front_page', 'page_category_regex', 'page_dict_regex',
             'page_group_regex', 'page_template_regex', 'page_license_page',
             'page_local_spelling_words', 'acl_rights_default',
             'acl_rights_before', 'acl_rights_after', 'mail_from'
--- a/MoinMoin/search/Xapian.py	Tue Jan 06 20:50:22 2009 +0100
+++ b/MoinMoin/search/Xapian.py	Wed Jan 07 01:30:56 2009 +0100
@@ -327,7 +327,7 @@
         fs_rootpage = 'FS' # XXX FS hardcoded
 
         try:
-            wikiname = request.cfg.interwikiname or 'Self'
+            wikiname = request.cfg.interwikiname or u'Self'
             itemid = "%s:%s" % (wikiname, os.path.join(fs_rootpage, filename))
             mtime = os.path.getmtime(filename)
             mtime = wikiutil.timestamp2version(mtime)
@@ -349,7 +349,7 @@
             if updated:
                 xitemid = xapdoc.Keyword('itemid', itemid)
                 mimetype, file_content = self.contentfilter(filename)
-                xwname = xapdoc.SortKey('wikiname', request.cfg.interwikiname or "Self")
+                xwname = xapdoc.SortKey('wikiname', request.cfg.interwikiname or u"Self")
                 xpname = xapdoc.SortKey('pagename', fs_rootpage)
                 xattachment = xapdoc.SortKey('attachment', filename) # XXX we should treat files like real pages, not attachments
                 xmtime = xapdoc.SortKey('mtime', mtime)
@@ -441,7 +441,7 @@
                    'update' = check if already in index and update if needed (mtime)
         """
         request = page.request
-        wikiname = request.cfg.interwikiname or "Self"
+        wikiname = request.cfg.interwikiname or u"Self"
         pagename = page.page_name
         mtime = page.mtime_usecs()
         revision = str(page.get_real_rev())
@@ -537,7 +537,7 @@
             if updated:
                 xatt_itemid = xapdoc.Keyword('itemid', att_itemid)
                 xpname = xapdoc.SortKey('pagename', pagename)
-                xwname = xapdoc.SortKey('wikiname', request.cfg.interwikiname or "Self")
+                xwname = xapdoc.SortKey('wikiname', request.cfg.interwikiname or u"Self")
                 xattachment = xapdoc.SortKey('attachment', att) # this is an attachment, store its filename
                 xmtime = xapdoc.SortKey('mtime', mtime)
                 xrev = xapdoc.SortKey('revision', '0')
@@ -572,7 +572,7 @@
 
     def _remove_item(self, writer, page, attachment=None):
         request = page.request
-        wikiname = request.cfg.interwikiname or 'Self'
+        wikiname = request.cfg.interwikiname or u'Self'
         pagename = page.page_name
 
         if not attachment:
--- a/MoinMoin/theme/__init__.py	Tue Jan 06 20:50:22 2009 +0100
+++ b/MoinMoin/theme/__init__.py	Wed Jan 07 01:30:56 2009 +0100
@@ -209,7 +209,7 @@
         """
         if self.request.cfg.show_interwiki:
             page = wikiutil.getFrontPage(self.request)
-            text = self.request.cfg.interwikiname or 'Self'
+            text = self.request.cfg.interwikiname or u'Self'
             link = page.link_to(self.request, text=text, rel='nofollow')
             html = u'<div id="interwiki"><span>%s</span></div>' % link
         else:
--- a/MoinMoin/user.py	Tue Jan 06 20:50:22 2009 +0100
+++ b/MoinMoin/user.py	Wed Jan 07 01:30:56 2009 +0100
@@ -639,7 +639,7 @@
         @param tm: timestamp
         """
         if self.valid:
-            interwikiname = unicode(self._cfg.interwikiname or '')
+            interwikiname = self._cfg.interwikiname or u''
             bookmark = unicode(tm)
             self.bookmarks[interwikiname] = bookmark
             self.save()
@@ -651,7 +651,7 @@
         @return: bookmark timestamp or None
         """
         bm = None
-        interwikiname = unicode(self._cfg.interwikiname or '')
+        interwikiname = self._cfg.interwikiname or u''
         if self.valid:
             try:
                 bm = int(self.bookmarks[interwikiname])
@@ -665,7 +665,7 @@
         @rtype: int
         @return: 0 on success, 1 on failure
         """
-        interwikiname = unicode(self._cfg.interwikiname or '')
+        interwikiname = self._cfg.interwikiname or u''
         if self.valid:
             try:
                 del self.bookmarks[interwikiname]