1
0
Fork 0

Decaf mobile: an (almost) Javascript-free theme

This commit is contained in:
Zach Prezkuta 2013-01-26 12:52:21 -07:00
commit 488a38cd85
300 changed files with 11117 additions and 328 deletions

View file

@ -1935,6 +1935,36 @@ function build_querystring($params, $name=null) {
return $ret;
}
function explode_querystring($query) {
$arg_st = strpos($query, '?');
if($arg_st !== false) {
$base = substr($query, 0, $arg_st);
$arg_st += 1;
}
else {
$base = '';
$arg_st = 0;
}
$args = explode('&', substr($query, $arg_st));
foreach($args as $k=>$arg) {
if($arg === '')
unset($args[$k]);
}
$args = array_values($args);
if(!$base) {
$base = $args[0];
unset($args[0]);
$args = array_values($args);
}
return array(
'base' => $base,
'args' => $args,
);
}
/**
* Returns the complete URL of the current page, e.g.: http(s)://something.com/network
*