mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
index.php: Move voter page token check to switch control structure
Voter page token check takes place in the same way as other existing token checks. Move the check for consistency. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
e383205eda
commit
c7d20163a4
1 changed files with 4 additions and 6 deletions
|
@ -22,12 +22,6 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($tokens[3])) {
|
if (!empty($tokens[3])) {
|
||||||
if ($tokens[3] == 'voters') {
|
|
||||||
$_GET['ID'] = pkgid_from_name($tokens[2]);
|
|
||||||
include('voters.php');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO: Remove support for legacy URIs and move these
|
/* TODO: Remove support for legacy URIs and move these
|
||||||
* actions to separate modules. */
|
* actions to separate modules. */
|
||||||
switch ($tokens[3]) {
|
switch ($tokens[3]) {
|
||||||
|
@ -55,6 +49,10 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
|
||||||
case "merge":
|
case "merge":
|
||||||
include('pkgmerge.php');
|
include('pkgmerge.php');
|
||||||
return;
|
return;
|
||||||
|
case "voters":
|
||||||
|
$_GET['ID'] = pkgid_from_name($tokens[2]);
|
||||||
|
include('voters.php');
|
||||||
|
return;
|
||||||
default:
|
default:
|
||||||
header("HTTP/1.0 404 Not Found");
|
header("HTTP/1.0 404 Not Found");
|
||||||
include "./404.php";
|
include "./404.php";
|
||||||
|
|
Loading…
Add table
Reference in a new issue