diff options
author | z0rglub <z0rglub@piwigo.org> | 2004-08-30 22:00:46 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2004-08-30 22:00:46 +0000 |
commit | 0e2436f50a61f90da22e75085280bf9f2087699a (patch) | |
tree | bac0bec23ab9487453e212e66b5ba527b15c2e60 /include/functions.inc.php | |
parent | 0c482df04e1631e12db1fe99e904d6111b17adf1 (diff) |
add rating feature
git-svn-id: http://piwigo.org/svn/trunk@507 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r-- | include/functions.inc.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index c15149e20..df5b39e40 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -505,4 +505,38 @@ function redirect( $url ) exit(); } + +/** + * returns $_SERVER['QUERY_STRING'] whitout keys given in parameters + * + * @param array $rejects + * @returns string + */ +function get_query_string_diff($rejects = array()) +{ + $query_string = ''; + + $str = $_SERVER['QUERY_STRING']; + parse_str($str, $vars); + + $is_first = true; + foreach ($vars as $key => $value) + { + if (!in_array($key, $rejects)) + { + if ($is_first) + { + $query_string.= '?'; + $is_first = false; + } + else + { + $query_string.= '&'; + } + $query_string.= $key.'='.$value; + } + } + + return $query_string; +} ?>
\ No newline at end of file |