Closed (fixed)
Project:
Voting API
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2006 at 14:05 UTC
Updated:
26 Jan 2006 at 22:03 UTC
Hi again,
would it be possible to have votingapi_get_user_votes() return the votes for the current user by default, when NULL is passed as uid ?
This would be the patch:
Change
function votingapi_get_user_votes($content_type, $content_id, $uid) {
return _votingapi_get_raw_votes($content_type, $content_id, NULL, NULL, $uid);
}
To:
function votingapi_get_user_votes($content_type, $content_id, $uid = NULL) {
global $user;
if($uid == NULL) { $uid = $user->uid; }
return _votingapi_get_raw_votes($content_type, $content_id, NULL, NULL, $uid);
}
Comments
Comment #1
eaton commentedChecked in. Thanks!
Comment #2
(not verified) commented