Index: activity.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/activity/activity.module,v
retrieving revision 1.1.2.2.2.36.2.32
diff -u -r1.1.2.2.2.36.2.32 activity.module
--- activity.module	8 Apr 2009 18:24:45 -0000	1.1.2.2.2.36.2.32
+++ activity.module	7 Jul 2009 15:51:46 -0000
@@ -380,22 +380,23 @@
  * Insert an activity record. This gets called by modules wishing to record
  * their activities.
  *
  * @param $module 
  *   The name of the module that is doing the recording, eg. 'node'.
  *
  * @param $type 
  *   Module's can track more than one type of activity. For example, the 
  *   nodeactivity module tracks activities for each content type separately.
  *   This should be an identifier for the calling module to use.
  */
 function activity_insert($uid, $module, $type, $operation, $data, $target_users_roles) {
   // check time limit, ignore activity if within the limit
   $result = db_query("SELECT COUNT(*) FROM {activity} WHERE uid = %d AND module = '%s' AND type = '%s' AND operation = '%s' AND data = '%s' AND created >= %d", $uid, $module, $type, $operation, serialize($data), (time() - variable_get('activity_time_limit', 30)));
   
-  if (db_fetch_object($result)->count != 0) {
+  $result_row = db_fetch_object($result);
+  if ($result_row->count != 0) {
     return FALSE;
   }
   
   $aid = db_next_id('activity');
   db_query("INSERT INTO {activity} (aid, uid,  module,  type,  operation,  created, data)
                             VALUES (%d,  %d,   '%s',    '%s',  '%s',       %d,      '%s')",
