[FEATURE] Test field for Akismet 11/33311/3
authortritum_rz <ralf.zimmermann@tritum.de>
Tue, 14 Oct 2014 17:08:35 +0000 (19:08 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Tue, 14 Oct 2014 17:11:08 +0000 (19:11 +0200)
Resolves: #59247
Releases: 6.2
Change-Id: I228fcb15a2a25fbf73aa67adfd8df2656a5c5fe0
Reviewed-on: http://review.typo3.org/33311
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
ChangeLog
Classes/Methodes/class.tx_wtspamshield_method_akismet.php
Configuration/TypoScript/constants.txt
Configuration/TypoScript/setup.txt

index 410e952..da82a0f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
        Ralf Zimmermann <ralf.zimmermann@tritum.de>
 
        * FIX feature #62238: Akismet check takes a lot of time
+       * ADD feature #59247: Test field for Akismet
 
        2014-09-24
        Ralf Zimmermann <ralf.zimmermann@tritum.de>
index aa73fbb..bf277de 100755 (executable)
@@ -71,6 +71,10 @@ class tx_wtspamshield_method_akismet extends tx_wtspamshield_method_abstract {
                        'user_agent' => t3lib_div::getIndpEnv('HTTP_USER_AGENT')
                );
 
+               if ((int) $tsConf['akismetCheck.']['testMode'] == 1) {
+                       $akismetArray['is_test'] = 1;
+               }
+
                $akismet = new tx_wtspamshield_akismet(
                        'http://' . t3lib_div::getIndpEnv('HTTP_HOST') . '/',
                        $tsConf['akismetCheck.']['akismetKey'],
index 5cafa57..d30aabb 100644 (file)
@@ -120,6 +120,9 @@ plugin.wt_spamshield {
   # cat=wt_spamshield main//0360; type=text; label= akismetCheck: Enter your Akismet key to activate Akismet check (signup at https://akismet.com/signup/).
   akismetCheck.akismetKey =
 
+  # cat=wt_spamshield main//0365; type=text; label= akismetCheck Test Mode: Enable the akismet test mode (is_test=1)
+  akismetCheck.testMode = 0
+
   # cat=wt_spamshield main//0370; type=int; label= Session start time (s): Minimum time frame between entering the form page and submiting the form. 0 for disable.
   sessionCheck.sessionStartTime = 10
 
index d58fe78..87ecb4c 100644 (file)
@@ -80,6 +80,7 @@ plugin.wt_spamshield {
 
   akismetCheck {
     akismetKey = {$plugin.wt_spamshield.akismetCheck.akismetKey}
+    testMode = {$plugin.wt_spamshield.akismetCheck.testMode}
   }
 
   sessionCheck {