| 1 |
<?php |
<?php |
| 2 |
// $Id: fivestar.module,v 1.20 2009/06/30 22:59:17 quicksketch Exp $ |
// $Id: fivestar.module,v 1.21 2009/06/30 23:48:03 quicksketch Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 387 |
* @return boolean |
* @return boolean |
| 388 |
*/ |
*/ |
| 389 |
function fivestar_validate_target($type, $id, $tag, $uid = NULL) { |
function fivestar_validate_target($type, $id, $tag, $uid = NULL) { |
| 390 |
if (!isset($account)) { |
if (!isset($uid)) { |
| 391 |
$uid = $GLOBALS['user']->uid; |
$uid = $GLOBALS['user']->uid; |
| 392 |
} |
} |
| 393 |
|
|
| 415 |
* Identifier within the type (in this case nid). |
* Identifier within the type (in this case nid). |
| 416 |
* @param $tag |
* @param $tag |
| 417 |
* The VotingAPI tag string. |
* The VotingAPI tag string. |
| 418 |
* @param $account |
* @param $uid |
| 419 |
* The user trying to cast the vote. |
* The user ID trying to cast the vote. |
| 420 |
* |
* |
| 421 |
* @return boolean or NULL |
* @return boolean or NULL |
| 422 |
* Returns TRUE if voting is supported on this object. |
* Returns TRUE if voting is supported on this object. |
| 539 |
|
|
| 540 |
|
|
| 541 |
function fivestar_block($op = 'list', $delta = 0, $edit = array()) { |
function fivestar_block($op = 'list', $delta = 0, $edit = array()) { |
|
global $user; |
|
| 542 |
switch ($op) { |
switch ($op) { |
| 543 |
case 'list': |
case 'list': |
| 544 |
$blocks[0]['info'] = t('Fivestar: Rate this node'); |
$blocks[0]['info'] = t('Fivestar: Rate this node'); |