Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/differences.php14
1 files changed, 7 insertions, 7 deletions
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);