Index: activity.module
===================================================================
--- activity.module	(revision 45)
+++ activity.module	(working copy)
@@ -197,9 +197,9 @@
  */
 function activity_insert($module, $type, $operation, $data, $target_users_roles) {
   // check time limit, ignore activity if within the limit
-  $result = db_query("SELECT COUNT(*) FROM {activity} WHERE module = '%s' AND type = '%s' AND operation = '%s' AND data = '%s' AND created >= %d", $module, $type, $operation, serialize($data), (time() - variable_get('activity_time_limit', 30)));
-  
-  if (db_fetch_object($result)->count != 0) {
+  $result = db_query("SELECT COUNT(*) AS total FROM {activity} WHERE module = '%s' AND type = '%s' AND operation = '%s' AND data = '%s' AND created >= %d", $module, $type, $operation, serialize($data), (time() - variable_get('activity_time_limit', 30)));
+
+  if (db_fetch_object($result)->total != 0) {
     return FALSE;
   }
   
