mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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 <archlinux@cryptocrack.de>
This commit is contained in:
parent
20704e9053
commit
2e552cbcad
2 changed files with 19 additions and 13 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue