index : website | |
Archlinux32 website - obsolete | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-19 14:11:25 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-19 14:11:25 +0100 |
commit | cb8fd086de23e016a465870be8c2175c3f703334 (patch) | |
tree | 3c819aae716772506ee51b2c3cdafaf1d42162c6 /packages | |
parent | b2732250e84a45fae1c13c93036630456cae5ac7 (diff) |
-rw-r--r-- | packages/differences.php | 14 |
diff --git a/packages/differences.php b/packages/differences.php index f12e0a2..f9b43af 100644 --- a/packages/differences.php +++ b/packages/differences.php @@ -5,18 +5,18 @@ require_once "../init.php"; require_once BASE . "/lib/style.php"; require_once BASE . "/lib/mysql.php"; -$uri_parts = explode('/', $_SERVER['REQUEST_URI']); +$uri_parts = explode('?', $_SERVER['REQUEST_URI'], 2); +if (count($uri_parts) > 1) + $options = $uri_parts[1]; +else + $options = ''; + +$uri_parts = explode('/', $uri_parts[0]); if ($uri_parts[0] != '' || $uri_parts[1] != 'packages' || $uri_parts[2] != 'differences') 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); |