Index: userpoints_votingapi.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/userpoints_votingapi/userpoints_votingapi.module,v
retrieving revision 1.1.2.1.2.2
diff -u -p -r1.1.2.1.2.2 userpoints_votingapi.module
--- userpoints_votingapi.module	29 Jul 2008 19:09:56 -0000	1.1.2.1.2.2
+++ userpoints_votingapi.module	30 Jul 2008 12:18:26 -0000
@@ -51,17 +51,18 @@ function userpoints_votingapi_form_alter
  *
  */
 function userpoints_votingapi_votingapi_insert($vote) {
+  $vote = $vote[0];
   $threshold = variable_get(userpoints_votingapi_daily_threshold, 0);
-  if (($threshold == '0') OR (userpoints_votingapi_within_threshold($vote->uid, $threshold))) {
+  if (($threshold == '0') OR (userpoints_votingapi_within_threshold($vote['uid'], $threshold))) {
   userpoints_userpointsapi(array(
-    'uid'       => $vote->uid,
+    'uid'       => $vote['uid'],
     'points'    => variable_get(userpoints_votingapi_vote, 1),
     'moderate' => variable_get(userpoints_votingapi_moderation, 0),
-    'event'     => $vote->tag,
-    'entity_id' => $vote->content_id,
-    'entity_type' => $vote->content_type,
+    'event'     => $vote['tag'],
+    'entity_id' => $vote['content_id'],
+    'entity_type' => $vote['content_type'],
     'operation'     => 'vote',
-    'description' => 'Vote cast: '. $vote->content_type .' '. $vote->content_id .'.',
+    'description' => t('Vote cast: !content_type !content_id.',array('!content_type'=> $vote['content_type'], '!content_id'=> $vote['content_id'])),
     )
   );
  }
@@ -72,17 +73,18 @@ function userpoints_votingapi_votingapi_
  *
  */
 function userpoints_votingapi_votingapi_delete($vote) {
+  $vote = $vote[0];
   $threshold = variable_get(userpoints_votingapi_daily_threshold, 0);
-  if (($threshold == '0') OR (userpoints_votingapi_within_threshold($vote->uid, $threshold))) {
+  if (($threshold == '0') OR (userpoints_votingapi_within_threshold($vote['uid'], $threshold))) {
   userpoints_userpointsapi(array(
-    'uid'       => $vote->uid,
+    'uid'       => $vote['uid'],
     'points'    => -1 * variable_get(userpoints_votingapi_vote, 1),
     'moderate' => variable_get(userpoints_votingapi_moderation, 0),
-    'event'     => $vote->tag,
-    'entity_id' => $vote->content_id,
-    'entity_type' => $vote->content_type,
+    'event'     => $vote['tag'],
+    'entity_id' => $vote['content_id'],
+    'entity_type' => $vote['content_type'],
     'operation'     => 'vote',
-    'description' => 'Vote cancelled: '. $vote->content_type .' '. $vote->content_id .'.',
+    'description' => t('Vote cancelled: !content_type !content_id.',array('!content_type'=> $vote['content_type'], '!content_id'=> $vote['content_id'])),
     )
   );
  }
@@ -91,4 +93,4 @@ function userpoints_votingapi_votingapi_
 function userpoints_votingapi_within_threshold($uid, $threshold) {
   $number = db_result(db_query("SELECT COUNT(*) FROM {votingapi_vote} WHERE uid = %d AND timestamp > %d", $uid, time() - 86400));
   return ($number <= $threshold ? TRUE : FALSE);
-}
\ No newline at end of file
+}
