/[drupal]/contributions/modules/spam/spam.module
ViewVC logotype

Diff of /contributions/modules/spam/spam.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.51.4.1.2.41.2.30.2.15, Thu Aug 6 21:06:49 2009 UTC revision 1.51.4.1.2.41.2.30.2.16, Mon Aug 10 03:03:11 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: spam.module,v 1.51.4.1.2.41.2.30.2.14 2009/08/06 16:00:27 jeremy Exp $  // $Id: spam.module,v 1.51.4.1.2.41.2.30.2.15 2009/08/06 21:06:49 jeremy Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 161  function spam_content_filter($content, $ Line 161  function spam_content_filter($content, $
161        if (!$counter) {        if (!$counter) {
162          spam_log(SPAM_VERBOSE, 'spam_content_filter', t('No filters enabled for group !gid, content not scanned.', array('!gid' => $gid)), $type, $id);          spam_log(SPAM_VERBOSE, 'spam_content_filter', t('No filters enabled for group !gid, content not scanned.', array('!gid' => $gid)), $type, $id);
163        }        }
164        if ($id) {        if ($total) {
165          if ($total) {          $log_score = spam_sanitize_score($score / $total);
           $scores["$type-$id"] = spam_sanitize_score($score / $total);  
         }  
         else {  
           $scores["$type-$id"] = 1;  
         }  
166        }        }
167        else {        else {
168          // Don't cache if we don't have an ID, as we may scan multiple pieces          $log_score = 1;
169          // of content without an ID.  Update the score, however, for logging        }
170          // purposes.        if ($id) {
171          if ($total) {          $scores["$type-$id"] = $log_score;
           $log_score = spam_sanitize_score($score / $total);  
         }  
         else {  
           $log_score = 1;  
         }  
172        }        }
173      }      }
174      else {      else {
# Line 201  function spam_content_filter($content, $ Line 191  function spam_content_filter($content, $
191        }        }
192        spam_update_statistics(t('detected spam'));        spam_update_statistics(t('detected spam'));
193        spam_update_statistics(t('content_filter redirect'));        spam_update_statistics(t('content_filter redirect'));
194        spam_log(SPAM_VERBOSE, 'spam_content_filter', t('Spam score [!score], redirecting to: !url', array('!score' => (isset($scores["$type-$id"]) ? $scores["$type-$id"] : $log_score), '!url' => $redirect)), $type, $id);        spam_log(SPAM_VERBOSE, 'spam_content_filter', t('Spam score [!score], redirecting to: !url', array('!score' => $log_score, '!url' => $redirect)), $type, $id);
195        drupal_goto($redirect);        drupal_goto($redirect);
196      }      }
197    }    }

Legend:
Removed from v.1.51.4.1.2.41.2.30.2.15  
changed lines
  Added in v.1.51.4.1.2.41.2.30.2.16

  ViewVC Help
Powered by ViewVC 1.1.2