Skip to content

Commit

Permalink
addlang on spamcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
davydovct committed Jun 6, 2018
1 parent 33f48f3 commit 58cda13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions cleantalk/antispam/event/main_listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,12 @@ public function global_check()
$spam_check['type'] = 'comment';

$result = \cleantalk\antispam\model\main_model::check_spam($spam_check);
if ($result)
{
if ($result['errno'] == 0 && $result['allow'] == 0) // Spammer exactly.
{
// Output error
trigger_error($result['ct_result_comment']);
}
}

if ($result['errno'] == 0 && $result['allow'] == 0) // Spammer exactly.
{
// Output error
trigger_error($result['ct_result_comment']);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion cleantalk/antispam/model/main_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class main_model
static public function check_spam( $spam_check )
{
global $config, $user, $request, $phpbb_root_path, $phpEx, $phpbb_log;

$user->add_lang('acp/common');
$checkjs = self::cleantalk_is_valid_js() ? 1 : 0;

$ct = new \cleantalk\antispam\model\Cleantalk();
Expand Down

0 comments on commit 58cda13

Please sign in to comment.