Closed (fixed)
Project:
Plus 1
Version:
6.x-2.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2010 at 00:30 UTC
Updated:
27 Jan 2011 at 17:10 UTC
…instead of to the node page - though if someone votes from that page, it will still work. I'm using Plus1 in a case where I'm using a view to list several nodes on one page, from which users can vote, and we want them to go back to that same view page, not to the node's page.
| Comment | File | Size | Author |
|---|---|---|---|
| plus1-referer.patch | 466 bytes | Garrett Albright |
Comments
Comment #1
nancydruLooks good to me.
Comment #2
voxpelli commentedA fallback is needed if the referer isn't set since we can't rely on the referer always being there?
Comment #3
nancydruJust a thought: How about something like
Shouldn't that work in all cases?
Comment #4
nancydruActually, my suggestion does not work because the button goes to /plus1/vote. However, would that not ensure that a referer is set?
Comment #5
voxpelli commentedI don't think referers can be relied on - why not use Drupal's destination system instead?
Comment #6
nancydruHow about
and
I'm not sure, but I think the query string should use drupal_urlencode().
Comment #7
voxpelli commentedThe drupal_goto('node/'. $nid) doesn't need to be changed - we only need to add the destination to the url. We could do that as an extension of the patch in #322735: Vote link is executed by search engines?
Comment #8
nancydruToo fast; we cross-posted.
Comment #9
nancydruComment #10
nancydruCommitted to 6.x-2.x-dev.