Index: fivestar.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/fivestar/fivestar.module,v retrieving revision 1.13.2.60 diff -u -r1.13.2.60 fivestar.module --- fivestar.module 30 Jun 2009 23:47:32 -0000 1.13.2.60 +++ fivestar.module 30 Jun 2009 23:57:29 -0000 @@ -832,7 +832,7 @@ * @return boolean */ function fivestar_validate_target($type, $id, $uid = NULL) { - if (!isset($account)) { + if (!isset($uid)) { $uid = $GLOBALS['user']->uid; } @@ -858,8 +858,8 @@ * Type of target (currently only node is supported). * @param $id * Identifier within the type (in this case nid). - * @param $account - * The user trying to cast the vote. + * @param $uid + * The user ID trying to cast the vote. * * @return boolean or NULL * Returns TRUE if voting is supported on this object. @@ -868,7 +868,7 @@ * of permissions defined in other modules, return FALSE. Note if all * modules return NULL, stating no preference, then access will be denied. */ -function fivestar_fivestar_access($type, $id, $account) { +function fivestar_fivestar_access($type, $id, $uid) { if ($type == 'node' && $node = node_load($id)) { if (variable_get('fivestar_'. $node->type, 0)) { return TRUE; @@ -918,8 +918,7 @@ switch ($position) { case 'above': case 'below': - global $user; - if (user_access('rate content') && fivestar_validate_target($node->type, $node->nid, $user->uid)) { + if (user_access('rate content') && fivestar_validate_target('node', $node->nid)) { $node->content['fivestar_widget'] = array( '#value' => fivestar_widget_form($node), '#weight' => $position == 'above' ? -10 : 50, @@ -967,7 +966,6 @@ function fivestar_block($op = 'list', $delta = 0, $edit = array()) { - global $user; switch ($op) { case 'list': $blocks[0]['info'] = t('Fivestar: Rate this node');