Permalink
Browse files

spamblock 1.79 - killswitch check to verify_once

  • Loading branch information...
1 parent 763d121 commit bf3b1a05e8c9eeb64fd37ac5fa2a0632c62da4d1 @ophian ophian committed Feb 13, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 plugins/serendipity_event_spamblock/serendipity_event_spamblock.php
@@ -28,7 +28,7 @@ function introspect(&$propbag)
'smarty' => '2.6.7',
'php' => '4.1.0'
));
- $propbag->add('version', '1.78');
+ $propbag->add('version', '1.79');
$propbag->add('event_hooks', array(
'frontend_saveComment' => true,
'external_plugin' => true,
@@ -927,6 +927,11 @@ function event_hook($event, &$bag, &$eventData, $addData = null) {
// already there #$eventData = array('allow_comments' => false);
// already there #$serendipity['messagestack']['emails'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_BODY;
return false;
+ } elseif (serendipity_db_bool($this->get_config('killswitch', false)) === true) {
+ $this->log($logfile, $eventData['id'], 'REJECTED', PLUGIN_EVENT_SPAMBLOCK_REASON_KILLSWITCH, $addData);
+ $eventData = array('allow_comments' => false);
+ $serendipity['messagestack']['comments'][] = PLUGIN_EVENT_SPAMBLOCK_ERROR_KILLSWITCH;
+ return false;
} else {
$this->log($logfile, $eventData['id'], 'MODERATE', PLUGIN_EVENT_SPAMBLOCK_CHECKMAIL_VERIFICATION_MAIL, $addData);
$eventData['moderate_comments'] = true;

0 comments on commit bf3b1a0

Please sign in to comment.