function block_refresh_get_query_as_string in Block Refresh 7
Same name and namespace in other branches
- 7.2 block_refresh.module \block_refresh_get_query_as_string()
get all $_GET values, unset q 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 DRUPAL 7 STATUS: WORKING!
File
- ./
block_refresh.module, line 172
Code
function block_refresh_get_query_as_string() {
$vars = $_GET;
if (!empty($vars['q'])) {
unset($vars['q']);
}
if (count($vars) > 0) {
$querystring = '?' . http_build_query($vars);
return $querystring;
}
else {
return '';
}
}