Skip to content

Commit

Permalink
Added admin notice email
Browse files Browse the repository at this point in the history
Admin notice for API failures on onSpamCheck().
  • Loading branch information
shagimuratov committed Nov 6, 2014
1 parent 6ce1ec3 commit 52e73c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions antispambycleantalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* CleanTalk joomla plugin
*
* @version 2.4
* @version 2.5
* @package Cleantalk
* @subpackage Joomla
* @author CleanTalk (welcome@cleantalk.ru)
Expand All @@ -21,7 +21,7 @@ class plgSystemAntispambycleantalk extends JPlugin {
/**
* Plugin version string for server
*/
const ENGINE = 'joomla-24';
const ENGINE = 'joomla-25';

/**
* Default value for hidden field ct_checkjs
Expand Down Expand Up @@ -1204,6 +1204,10 @@ public function onSpamCheck($context='', $data){
)
);

if ($ctResponse['errno'] != 0) {
$this->sendAdminEmail("CleanTalk plugin error", $ctResponse['comment']);
}

if (!empty($ctResponse['allow']) AND $ctResponse['allow'] == 1) {
return true;
} else {
Expand Down

0 comments on commit 52e73c7

Please sign in to comment.