/[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.14, Thu Aug 6 16:00:27 2009 UTC revision 1.51.4.1.2.41.2.30.2.15, Thu Aug 6 21:06:49 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: spam.module,v 1.51.4.1.2.41.2.30.2.13 2009/08/05 16:24:06 jeremy Exp $  // $Id: spam.module,v 1.51.4.1.2.41.2.30.2.14 2009/08/06 16:00:27 jeremy Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 169  function spam_content_filter($content, $ Line 169  function spam_content_filter($content, $
169            $scores["$type-$id"] = 1;            $scores["$type-$id"] = 1;
170          }          }
171        }        }
172          else {
173            // Don't cache if we don't have an ID, as we may scan multiple pieces
174            // of content without an ID.  Update the score, however, for logging
175            // purposes.
176            if ($total) {
177              $log_score = spam_sanitize_score($score / $total);
178            }
179            else {
180              $log_score = 1;
181            }
182          }
183      }      }
184      else {      else {
185        spam_log(SPAM_VERBOSE, 'spam_content_filter', t('No main filter field defined, skipping.  Returned fields: !fields', array('!fields' => implode(', ', $fields))), $type, $id);        spam_log(SPAM_VERBOSE, 'spam_content_filter', t('No main filter field defined, skipping.  Returned fields: !fields', array('!fields' => implode(', ', $fields))), $type, $id);
# Line 190  function spam_content_filter($content, $ Line 201  function spam_content_filter($content, $
201        }        }
202        spam_update_statistics(t('detected spam'));        spam_update_statistics(t('detected spam'));
203        spam_update_statistics(t('content_filter redirect'));        spam_update_statistics(t('content_filter redirect'));
204        spam_log(SPAM_VERBOSE, 'spam_content_filter', t('Spam score [!score], redirecting to: !url', array('!score' => $scores["$type-$id"], '!url' => $redirect)), $type, $id);        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);
205        drupal_goto($redirect);        drupal_goto($redirect);
206      }      }
207    }    }

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

  ViewVC Help
Powered by ViewVC 1.1.2