function block_refresh_get_query_as_string in Block Refresh 7.2
Same name and namespace in other branches
- 7 block_refresh.module \block_refresh_get_query_as_string()
get all $_GET values, unset q and render, and return as string
1 call to block_refresh_get_query_as_string()
- block_refresh_init in ./
block_refresh.module - Implements hook_init(). Calls the jquery to refresh blocks automatically, but only if the blocks exist on the current page and are enabled
File
- ./
block_refresh.module, line 256
Code
function block_refresh_get_query_as_string() {
$vars = $_GET;
if (!empty($vars['q'])) {
unset($vars['q']);
}
if (!empty($vars['render'])) {
unset($vars['render']);
}
if (count($vars) > 0) {
$querystring = '?' . http_build_query($vars);
return $querystring;
}
else {
return '';
}
}