Index: spam/spam.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/spam/spam.module,v
retrieving revision 1.51.4.1.2.41.2.30.2.16
diff -u -p -r1.51.4.1.2.41.2.30.2.16 spam.module
--- spam/spam.module	10 Aug 2009 03:03:11 -0000	1.51.4.1.2.41.2.30.2.16
+++ spam/spam.module	23 Sep 2009 14:54:14 -0000
@@ -294,7 +294,7 @@ function spam_content_update($content, $
   $score = 0;
   if ($id) {
     $score = spam_content_filter($content, $type, $extra);
-    db_query("UPDATE {spam_tracker} SET score = %d, hostname = %d, timestamp = %d WHERE content_type = '%s' AND content_id = '%s'", $score, time(), $type, $id);
+    db_query("UPDATE {spam_tracker} SET score = %d, hostname = %d, timestamp = %d WHERE content_type = '%s' AND content_id = %d", $score, time(), $type, $id);
     $sid = db_result(db_query("SELECT sid FROM {spam_tracker} WHERE content_type = '%s' AND content_id = %d", $type, $id));
     if ($sid) {
       watchdog('spam', 'Updated %type with id %id in spam tracker table.', array('%type' => $type, '%id' => $id), WATCHDOG_NOTICE);
Index: spam/filters/duplicate/duplicate.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/spam/filters/duplicate/Attic/duplicate.module,v
retrieving revision 1.1.2.11.2.3
diff -u -p -r1.1.2.11.2.3 duplicate.module
--- spam/filters/duplicate/duplicate.module	17 Jun 2009 19:32:47 -0000	1.1.2.11.2.3
+++ spam/filters/duplicate/duplicate.module	23 Sep 2009 14:54:14 -0000
@@ -376,7 +376,7 @@ function spam_logs_blocked_ip() {
   // This unfortunately has to be SQL because the pager module can't be told
   // how many rows we've got (so we can't do our own processing in PHP and
   // still get paging to work properly).
-  $sql = "SELECT * FROM (SELECT DISTINCT x.hostname, x.timestamp, COUNT(x.hostname) AS count FROM (SELECT timestamp, hostname FROM {spam_tracker} WHERE score > %d ORDER BY timestamp DESC) AS x GROUP BY x.hostname) AS y WHERE y.count >= %d";
+  $sql = "SELECT * FROM (SELECT DISTINCT x.hostname, x.timestamp, COUNT(x.hostname) AS count FROM (SELECT timestamp, hostname FROM {spam_tracker} WHERE score > %d ORDER BY timestamp DESC) AS x GROUP BY x.hostname, x.timestamp) AS y WHERE y.count >= %d";
   $arguments = array(variable_get('spam_threshold', SPAM_DEFAULT_THRESHOLD), variable_get('spam_blacklist_ip', DUPLICATE_DEFAULT_BLACKLIST));
 
   $count_sql = preg_replace('/^SELECT \* /', 'SELECT count(hostname) ', $sql);
