Created
November 23, 2011 16:23
-
-
Save sobi3ch/1389113 to your computer and use it in GitHub Desktop.
dobrafaza nadpisywanie wszystkich linkow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* overwrite all links with extra subkultura _GET parametr | |
* This is usefull for people that send link over IM's | |
* @param type $path | |
* @param type $options | |
* @param type $original_path | |
*/ | |
function custom_url_rewrite_outbound(&$path, &$options, $original_path) { | |
if(isset($_SESSION['subculture'])) { | |
if(!empty($options['query'])) { | |
$options['query'] .= '&'. drupal_query_string_encode(array('subkultura' => $_SESSION['subculture'])); | |
} else { | |
$options['query'] = drupal_query_string_encode(array('subkultura' => $_SESSION['subculture'])); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment