changeset 1959:7ccf35e8f674

use a list to have defined order for cfg.sistersites (e.g. in theme output)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 07 Apr 2007 00:52:17 +0200
parents aa3e4fb31c62
children 1687a0130ebe
files MoinMoin/action/pollsistersites.py MoinMoin/config/multiconfig.py MoinMoin/theme/__init__.py docs/CHANGES
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/pollsistersites.py	Sat Apr 07 00:21:47 2007 +0200
+++ b/MoinMoin/action/pollsistersites.py	Sat Apr 07 00:52:17 2007 +0200
@@ -17,7 +17,7 @@
 
 def execute(pagename, request):
     status = []
-    for sistername, sisterurl in request.cfg.sistersites.items():
+    for sistername, sisterurl in request.cfg.sistersites:
         arena = 'sisters'
         key = sistername
         cache = caching.CacheEntry(request, arena, key, scope='farm', use_pickle=True)
--- a/MoinMoin/config/multiconfig.py	Sat Apr 07 00:21:47 2007 +0200
+++ b/MoinMoin/config/multiconfig.py	Sat Apr 07 00:52:17 2007 +0200
@@ -373,11 +373,11 @@
     quicklinks_default = [] # preload user quicklinks with this page list
     refresh = None # (minimum_delay, type), e.g.: (2, 'internal')
     rss_cache = 60 # suggested caching time for RecentChanges RSS, in seconds
-    sistersites = {
-        #'Self': 'http://localhost:8080/?action=sisterpages',
-        'EmacsWiki': 'http://www.emacswiki.org/cgi-bin/test?action=sisterpages',
-        'JspWiki': 'http://www.jspwiki.org/SisterSites.jsp',
-    } # dict {sistersitename: sisterpagelistfetchurl}
+    sistersites = [
+        #('Self', 'http://localhost:8080/?action=sisterpages'),
+        ('EmacsWiki', 'http://www.emacswiki.org/cgi-bin/test?action=sisterpages'),
+        ('JspWiki', 'http://www.jspwiki.org/SisterSites.jsp'),
+    ] # list of (sistersitename, sisterpagelistfetchurl)
     shared_intermap = None # can be string or list of strings (filenames)
     show_hosts = True
     show_interwiki = False
--- a/MoinMoin/theme/__init__.py	Sat Apr 07 00:21:47 2007 +0200
+++ b/MoinMoin/theme/__init__.py	Sat Apr 07 00:52:17 2007 +0200
@@ -446,7 +446,7 @@
             items.append(item % (cls, link))
 
         # Add sister pages.
-        for sistername in request.cfg.sistersites: # TODO: sort sistersites?
+        for sistername, sisterurl in request.cfg.sistersites:
             if sistername == request.cfg.interwikiname: # it is THIS wiki
                 cls = 'sisterwiki current'
                 items.append(item % (cls, sistername))
--- a/docs/CHANGES	Sat Apr 07 00:21:47 2007 +0200
+++ b/docs/CHANGES	Sat Apr 07 00:52:17 2007 +0200
@@ -322,7 +322,7 @@
       * action=sisterpages will generate a list of url pagename lines for all
         pages in your moin wiki.
       * action=pollsistersites will poll all sister sites listed in
-        cfg.sistersites = { 'OtherWiki': 'http://server/?action=sisterpages', ...}
+        cfg.sistersites = [('OtherWiki', 'http://otherwiki.org/?action=sisterpages'), ...]
       * if the current page exists on some sister wiki, a link to it will be
         added to the navibar.
       You can use sister wikis for adding another dimension to your wiki UI: use