Motivation: We're using 1click voting on a site where we want to have different output returned after casting a vote depending on whether you voted from a page view or a teaser view of a selection node.

Currently we don't pass the $page parameter when rendering the 1 click voting results. With the recently themeable selection_decisions_1click_controls() we can edit the $links but we don't get the $page parameter so when overriding that function we have to guess using menu_get_object or similar.

Instead, we could pass $page from decisions_selection_voting_form() to selection_decisions_1click_controls() and add a query string like page=1, and then look for it in selection_vote() and pass $page when we currently do print theme('selection_decisions_view_results', $node, FALSE, FALSE, $new_vote);

CommentFileSizeAuthor
#1 21004226.patch2.44 KBezra-g

Comments

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new2.44 KB

This patch turned out to be smaller than I imagined.

ezra-g’s picture

Status: Needs review » Fixed

I removed the unnecessary $page = 1 and this is now committed.

ezra-g’s picture

This was missing some parameters in hook_theme, but I have corrected that omission.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.