Commit 4f3c2120 authored by Vincent Le gallic's avatar Vincent Le gallic

[wiki/macro] On n'affiche pas les acl vides ni les pages moinmoin

parent a3715746
......@@ -7,6 +7,12 @@
changes:
12.2007 - conversion to new syntax by Bolesław Kulbabiński
Modifié par Vincent Le Galli <legallic@crans.org>
(cf http://moinmo.in/MacroMarket/1.6_AdminTools)
* patch pour ne pas afficher les acl "not defined"
* Si on fournit le paramètre IncludeSystemPages, on a aussi les pages MoinMoin,
mais par défaut, non.
"""
import os
......@@ -31,13 +37,15 @@ def macro_AllPagesWithACL(macro, args):
html += "Total: %s pages </p>" % str(len(pages))
for pagename in pages:
all[Page(macro.request, pagename).link_to(macro.request)] = getAcl(macro.request, pagename)
if Page(macro.request,pagename).isStandardPage() or (args != None and "IncludeSystemPages" in args):
all[Page(macro.request, pagename).link_to(macro.request)] = getAcl(macro.request, pagename)
html += "<table>"
all1 = sorted(all.items())
for pg, ac in all1:
html += "<tr><td>%s</td>" % pg
html += "<td>%s</td></tr>" % ac
if ac != "not defined":
html += "<tr><td>%s</td>" % pg
html += "<td>%s</td></tr>" % ac
html += "</table>"
return macro.formatter.rawHTML(html)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment