From 2e552cbcad8f4abd64041c793851b7420dd5361c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 18 Sep 2012 13:57:09 +0200 Subject: Do not set GET parameters in the routing framework Setting GET parameters manually is bad style and causes some strange side effects when using virtual URLs and mkurl(). Signed-off-by: Lukas Fleischer --- web/html/index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'web/html/index.php') diff --git a/web/html/index.php b/web/html/index.php index 2d80a94..5c56868 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -9,8 +9,11 @@ $tokens = explode('/', $path); if (isset($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { if (isset($tokens[2])) { - unset($_GET['ID']); - $_GET['N'] = $tokens[2]; + /* TODO: Create a proper data structure to pass variables from + * the routing framework to the individual pages instead of + * initializing arbitrary variables here. */ + $pkgname = $tokens[2]; + $pkgid = pkgid_from_name($pkgname); if (isset($tokens[3])) { if ($tokens[3] == 'voters') { -- cgit v1.2.3-70-g09d2