return local_user() && $admin_email && in_array(defaults($a->user, 'email', ''), $adminlist);
}
-/**
- * @brief Returns querystring as string from a mapped array.
- *
- * @param array $params mapped array with query parameters
- * @param string $name of parameter, default null
- *
- * @return string
- */
-function build_querystring($params, $name = null)
-{
- $ret = "";
- foreach ($params as $key => $val) {
- if (is_array($val)) {
- /// @TODO maybe not compare against null, use is_null()
- if ($name == null) {
- $ret .= build_querystring($val, $key);
- } else {
- $ret .= build_querystring($val, $name . "[$key]");
- }
- } else {
- $val = urlencode($val);
- /// @TODO maybe not compare against null, use is_null()
- if ($name != null) {
- /// @TODO two string concated, can be merged to one
- $ret .= $name . "[$key]" . "=$val&";
- } else {
- $ret .= "$key=$val&";
- }
- }
- }
- return $ret;
-}
-
function explode_querystring($query)
{
$arg_st = strpos($query, '?');
if ($remember_tab) {
$net_args = array_merge($query_array, $net_args);
- $net_queries = build_querystring($net_args);
+ $net_queries = http_build_query($net_args);
$redir_url = ($net_queries ? $net_baseurl . '?' . $net_queries : $net_baseurl);