Download & Extend

Support for querystring and fragment in goto URL

Project:Go - url redirects
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

The attached patch will make gotwo look for a querystring in the destination url. If it finds one, it'll properly pass it to drupal_goto. If no querystring is found, then it behaves normally.

One use-case is for passing querystring parameters used by google analytics. Ex:

Label: trackme
Destination: node/3?utm_source=direct&utm_medium=email&utm_campaign=supercampaign

This will result in:

<?php
drupal_goto
('node/3','utm_source=direct&utm_medium=email&utm_campaign=supercampaign');
?>
AttachmentSize
gotwo.module_querystring.patch760 bytes

Comments

#1

Version:6.x-1.0» 6.x-1.x-dev
Category:task» feature request
Status:needs review» needs work

I would better use http://www.php.net/manual/en/function.parse-url.php for slitting (and re-glue) URLs. Also code style needs work to follow core rules.

#2

Status:needs work» fixed

I will commit the attached patch.

AttachmentSize
gotwo_redirection_with_query_and_fragment-D6.patch 1.11 KB

#3

Title:Support for querystring in goto URL» Support for querystring and fragment in goto URL

#4

Status:fixed» closed (fixed)

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

nobody click here