[wiki/macro] On n'affiche pas les acl vides ni les pages moinmoin
This commit is contained in:
parent
a3715746cf
commit
4f3c2120e0
1 changed files with 11 additions and 3 deletions
|
@ -7,6 +7,12 @@
|
||||||
|
|
||||||
changes:
|
changes:
|
||||||
12.2007 - conversion to new syntax by Bolesław Kulbabiński
|
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
|
import os
|
||||||
|
@ -31,11 +37,13 @@ def macro_AllPagesWithACL(macro, args):
|
||||||
html += "Total: %s pages </p>" % str(len(pages))
|
html += "Total: %s pages </p>" % str(len(pages))
|
||||||
|
|
||||||
for pagename in pages:
|
for pagename in pages:
|
||||||
|
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)
|
all[Page(macro.request, pagename).link_to(macro.request)] = getAcl(macro.request, pagename)
|
||||||
|
|
||||||
html += "<table>"
|
html += "<table>"
|
||||||
all1 = sorted(all.items())
|
all1 = sorted(all.items())
|
||||||
for pg, ac in all1:
|
for pg, ac in all1:
|
||||||
|
if ac != "not defined":
|
||||||
html += "<tr><td>%s</td>" % pg
|
html += "<tr><td>%s</td>" % pg
|
||||||
html += "<td>%s</td></tr>" % ac
|
html += "<td>%s</td></tr>" % ac
|
||||||
html += "</table>"
|
html += "</table>"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue