changeset 553:814c6075c0b0

macro.ListPages: reverse order implemented
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 06 Mar 2011 11:56:34 +0100
parents d30ae1dca471
children fde88c905588
files data/plugin/macro/ListPages.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/macro/ListPages.py	Mon Feb 28 11:36:22 2011 +0100
+++ b/data/plugin/macro/ListPages.py	Sun Mar 06 11:56:34 2011 +0100
@@ -6,7 +6,7 @@
 
     @copyright: @copyright: 2001-2003 Juergen Hermann <jh@web.de>,
                 2003-2008 MoinMoin:ThomasWaldmann
-                2009-2010 MoinMoin:ReimarBauer
+                2009-2011 MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
 
@@ -24,7 +24,7 @@
     return segments[-1]
 
 def macro_ListPages(macro, search_term=u'.+', list_type=("number_list", "bullet_list"),
-                    link=("pagename", "subpage")):
+                    link=("pagename", "subpage"), reverse=False):
     """
     lists pages
     @param search_term: regex for searching of page titles
@@ -57,6 +57,8 @@
                    _subpage(page.page_name),
                    f.url(0)]) for page in pageobjs]   
         ret.sort()
+        if reverse:
+            ret.reverse()
         if list_type == "number_list":
             ret = ''.join([f.number_list(1), ''.join(ret), f.number_list(0)])
         if list_type == "bullet_list":