Mailman CAPTCHA: rename displayhtml -> display
authorRalf Jung <post@ralfj.de>
Sun, 10 Jun 2018 17:40:56 +0000 (19:40 +0200)
committerRalf Jung <post@ralfj.de>
Sun, 10 Jun 2018 17:40:56 +0000 (19:40 +0200)
roles/email/files/mailman-patched/Captcha.py
roles/email/files/mailman-patched/Cgi/listinfo.py

index 42f75f02d07755ce602f2d9c7fd2de6794340e8b..ae979d47fe81d057331c5bbe0d572f9ec279ad42 100644 (file)
@@ -18,7 +18,7 @@
 import random
 from Mailman import Utils
 
-def displayhtml(mlist, captchas):
+def display(mlist, captchas):
     """Returns a CAPTCHA question, the HTML for the answer box, and
     the data to be put into the CSRF token"""
     idx = random.randrange(len(captchas))
index 0ce6393f5b3d8343e7634f1754cd2f26827d4e93..b46bab149c87d83f2b81bb7d2e713dd3b1d70398 100644 (file)
@@ -221,7 +221,7 @@ def list_listinfo(mlist, lang):
             #        for our hash so it doesn't matter.
             remote = remote.rsplit(':', 1)[0]
         # get CAPTCHA data
-        (captcha_question, captcha_box, captcha_idx) = Captcha.displayhtml(mlist, mm_cfg.CAPTCHAS)
+        (captcha_question, captcha_box, captcha_idx) = Captcha.display(mlist, mm_cfg.CAPTCHAS)
         replacements['<mm-captcha-question>'] = captcha_question
         replacements['<mm-captcha-box>'] = captcha_box
         # fill form