Changeset 15837 for extensions


Ignore:
Timestamp:
Jun 19, 2012, 10:07:06 PM (12 years ago)
Author:
rvelices
Message:

sometimes akismet has false positives - try to get rid of them

Location:
extensions/rv_akismet
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_akismet/check.inc.php

    r13799 r15837  
    3232    {
    3333      $action = $conf['akismet_spam_action'];
     34      if ('reject'==$action && !is_a_guest() && isset($_SESSION['csi']))
     35        $action='moderate';
    3436      if ('reject'!=$action) set_status_header(403);
    3537      $counters[0]++;
     
    3739    }
    3840    else
     41    {
    3942      $_POST['cr'][] = 'aki-ok';
     43      if (!isset($_SESSION['csi']) && isset($_POST['url']) && strlen($_POST['url']) )
     44      {
     45        $action = 'reject';
     46        $_POST['cr'][] = 'csi url';
     47      }
     48    }
    4049    $counters[1]++;
    4150    $conf['akismet_counters'] = implode('/', $counters);
  • extensions/rv_akismet/main.inc.php

    r13799 r15837  
    4242        include_once( dirname(__FILE__).'/check.inc.php' );
    4343        $action = akismet_user_comment_check($action, $comment);
    44         if (!isset($_SESSION['csi']) && isset($_POST['url']) && strlen($_POST['url']) )
    45         {
    46                 $action = 'reject';
    47                 $_POST['cr'][] = 'csi url';
    48         }
    4944        return $action;
    5045}
     
    7065{
    7166        global $template, $conf;
    72         if (!isset($_SESSION['csi']) && strpos($_SERVER['HTTP_USER_AGENT'],'bot')===false)
     67        if (!isset($_SESSION['csi']) && strpos(@$_SERVER['HTTP_USER_AGENT'],'bot')===false)
    7368        {
    7469                $src = get_root_url().'plugins/'.AKIS_DIR.'/csi.php';
Note: See TracChangeset for help on using the changeset viewer.