index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | groups.php | 20 |
@@ -5,21 +5,19 @@ require_once "init.php"; require_once BASE . "/lib/style.php"; require_once BASE . "/lib/mysql.php"; -$uri_parts = explode('/', $_SERVER['REQUEST_URI']); +$options = explode('?', $_SERVER['REQUEST_URI'], 2); + +$uri_parts = explode('/', $options[0]); +if (count($options) == 2) + $options = $options[1]; +else + $options = ''; +if ($uri_parts[count($uri_parts)-1] == '') + array_pop($uri_parts); if ($uri_parts[0] != '' || $uri_parts[1] != 'groups') throw_http_error(422, 'Unprocessable Entity'); -$options = ''; - -$last = array_pop($uri_parts); -if (substr($last, 0, 1) == '?') { - $options = $last; - $last = array_pop($uri_parts); -} -if ($last != '') - array_push($uri_parts, $last); - array_splice( $uri_parts, 0, 2 |