Posted by nohup on January 12, 2011 at 11:44am
3 followers
| Project: | Vote Up/Down |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | interoperability |
Issue Summary
In the function vud_user_votes() use the function argument passed by the menu handler instead of arg(1)
Change from:
function vud_user_votes() {
if ($account = user_load(array('uid' => arg(1), 'status' => 1))) {to:
function vud_user_votes($account) {
if(!is_object($account)) $account = user_load(array('uid' => arg(1), 'status' => 1));
if ($account) {This change will avoid the use of arg(1) and will make it compatibility with the me module #925882: user/me/votes not mapped to user/[uid]/votes
Comments
#1
patch for vud.module attached
#2
I see what you mean.
But the real problem is that we are using "votes" string as we are the only module handling votes :-p
So, I would be glad to commit a patch that provides a better menu path, namespacing it.
I mean, changing:
$items['user/%user/votes']with$items['user/%user/vote_up_down/votes'.It is going to need a menu rebuilt on a
hook_update_N().#3
I changed a little the patch, and then pushed! (to 6.x-3.x and 6.x-2.x)
Thanks for reporting and providing the patch.
#4
I think 7.x can use this :-p
#5
Maybe is better to drop that feature for 7.x, I just realized that it's vud_node specific, so it should live there. Anyway, moving to old state.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.