Further optimize voters.php to only need the package name

* Extends changes in 81d4cc13dc
* Modify getvotes() to use the package name rather than package ID
* Rename getvotes() to votes_for_pkgname() for clarity with new changes
* Modify routing framework and links to now use package names for voters.php

Signed-off-by: canyonknight <canyonknight@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
canyonknight 2014-01-20 20:42:44 -05:00 committed by Lukas Fleischer
parent 81d4cc13dc
commit 1e9d539acf
4 changed files with 10 additions and 9 deletions

View file

@ -56,7 +56,7 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
include('pkgmerge.php');
return;
case "voters":
$_GET['ID'] = pkgid_from_name($tokens[2]);
$_GET['N'] = $tokens[2];
include('voters.php');
return;
default: