diff -Naur moin-1.3.5-org/MoinMoin/util/antispam.py moin-1.3.5/MoinMoin/util/antispam.py
--- moin-1.3.5-org/MoinMoin/util/antispam.py 2005-07-27 18:21:41.000000000 +0200
+++ moin-1.3.5/MoinMoin/util/antispam.py 2005-08-21 00:40:13.000000000 +0200
@@ -155,7 +155,8 @@
def save(self, editor, newtext, rev, **kw):
BLACKLISTPAGES = ["BadContent", "LocalBadContent"]
- if not editor.page_name in BLACKLISTPAGES:
+ WHITELISTPAGES = ["GoodContent","LocalGoodContent"]
+ if not editor.page_name in BLACKLISTPAGES + WHITELISTPAGES:
request = editor.request
# Start timing of antispam operation
@@ -168,6 +169,15 @@
invalidate_cache_necessary, blacklist_entries = getblacklist(request, pn, do_update)
blacklist += blacklist_entries
invalidate_cache |= invalidate_cache_necessary
+ whitelist = []
+ for pn in WHITELISTPAGES:
+ do_update = (pn != "LocalGoodContent")
+ invalidate_cache_necessary, whitelist_entries = getblacklist(request, pn, do_update)
+ whitelist += whitelist_entries
+ invalidate_cache |= invalidate_cache_necessary
+ for page_re in whitelist:
+ if page_re in blacklist:
+ blacklist.remove( page_re )
if blacklist:
if invalidate_cache:
MoinMoin: AntiSpamGlobalSolution/LocalGoodContentPatch (last edited 2007-10-29 19:08:25 by localhost)