index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-05-22 13:19:25 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-22 13:19:25 +0200 |
commit | 4b88074bdae7985c1a984dbc1cbef6c3eab9debe (patch) | |
tree | 48c350e8b30b968311b5f7edc09c3f4ed154750a | |
parent | a81b7c142b680d5d5526a6e4c1865dcad245600f (diff) |
-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 |