=== modified file 'userpoints_download/userpoints_download.module'
--- userpoints_download/userpoints_download.module	2010-06-14 09:20:55 +0000
+++ userpoints_download/userpoints_download.module	2010-06-15 13:08:45 +0000
@@ -78,15 +78,14 @@
     // Admin has not configured any points for download, do nothing ...
     return;
   }
-
-  userpoints_userpointsapi(array(
+  $params = array(
     'uid'         => $user->uid,
     'points'      => $points,
     'tid'         => variable_get(USERPOINTS_DOWNLOAD_TID, 0),
     'operation'   => 'download',
     'description' => 'Download ' . $filepath,
-    )
-  );
+    );
+  userpoints_userpointsapi( $param );
 
   return;
 }

=== modified file 'userpoints_contrib/userpoints_flag/userpoints_flag.module'
--- userpoints_flag/userpoints_flag.module	2010-06-14 09:20:55 +0000
+++ userpoints_flag/userpoints_flag.module	2010-06-15 13:10:38 +0000
@@ -81,9 +81,9 @@
   
   //no points for author
   if ($uid != $account->uid) {
-      $threshold = variable_get(userpoints_flag_daily_threshold, 0);
+    $threshold = variable_get(userpoints_flag_daily_threshold, 0);
 	  if (($threshold == '0') OR (_userpoints_flag_within_threshold($account->uid, $threshold))) {
-		  userpoints_userpointsapi(array(
+	    $param = array(
 		    'uid'       => $account->uid,
 		    'points'    => ($action == 'flag' ? variable_get(userpoints_flag_vote, 1): -1 * variable_get(userpoints_flag_vote, 1)),
 		    'moderate' => variable_get(userpoints_flag_moderation, 0),
@@ -91,19 +91,19 @@
 		    'entity_type' => $flag->content_type,
 		    'operation'     => 'flag',
 		    'description' => t('Flag cast: !content_type !content_id.',array('!content_type'=> $flag->content_type, '!content_id'=> $content_id)),
-		    )
-		  );
+		    );
+		  userpoints_userpointsapi($param);
 		  if (($author_points != 0) AND ($uid != 0)) {
-		    userpoints_userpointsapi(array(
-		    'uid'       => $uid,
-		    'points'    => ($action == 'flag' ? $author_points: -1 * $author_points),
-		    'moderate' => variable_get(userpoints_flag_moderation, 0),
-		    'entity_id' => $content_id,
-		    'entity_type' => $flag->content_type,
-		    'operation'     => 'flag author',
-		    'description' => t('Flag author cast: !content_type !content_id.',array('!content_type'=> $flag->content_type, '!content_id'=> $content_id)),
-		    )
-		    );
+		    $param = array(
+		      'uid'       => $uid,
+  		    'points'    => ($action == 'flag' ? $author_points: -1 * $author_points),
+  		    'moderate' => variable_get(userpoints_flag_moderation, 0),
+  		    'entity_id' => $content_id,
+  		    'entity_type' => $flag->content_type,
+  		    'operation'     => 'flag author',
+  		    'description' => t('Flag author cast: !content_type !content_id.',array('!content_type'=> $flag->content_type, '!content_id'=> $content_id)),
+  		    );
+		    userpoints_userpointsapi($param);
 		  }
 	  }
   }

=== modified file 'userpoints_modr8/userpoints_modr8.module'
--- userpoints_modr8/userpoints_modr8.module	2010-06-14 09:20:55 +0000
+++ userpoints_modr8/userpoints_modr8.module	2010-06-15 13:11:46 +0000
@@ -52,15 +52,14 @@
     // Admin has not configured any points for modr8
     return;
   }
-
-  userpoints_userpointsapi(array(
+  $param = array(
     'uid'         => $user->uid,
     'points'      => $points,
     'tid'         => variable_get(USERPOINTS_MODR8 . $op . '_tid', 0),
     'operation'   => "modr8-$op-$nid",
     'description' => "Moderation action: $op, for Node: $nid",
-    )
-  );
+    );
+  userpoints_userpointsapi($param);
 }
 
 function _userpoints_modr8_actions() {

=== modified file 'userpoints_pageviews/userpoints_pageviews.module'
--- userpoints_pageviews/userpoints_pageviews.module	2010-06-14 09:20:55 +0000
+++ userpoints_pageviews/userpoints_pageviews.module	2010-06-15 13:12:49 +0000
@@ -101,14 +101,15 @@
     $user->uid, $node->nid, ip_address(), time());
  
   // Award the points
-  userpoints_userpointsapi(array(
+  $param = array(
     'uid'         => $node->uid,
     'points'      => variable_get(USERPOINTS_PAGEVIEWS_NODE . $node->type, 0),
     'operation'   => 'node view',
     'entity_id'   => $node->nid,
     'entity_type' => 'node',
     'tid'         => variable_get(USERPOINTS_PAGEVIEW_TID, 0),
-  ));
+  );
+  userpoints_userpointsapi($param);
 }
 
 function userpoints_pageviews_check_timeout($nid = 0, $uid = 0) {

