summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorcanyonknight <canyonknight@gmail.com>2014-01-20 02:27:49 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-01-20 15:41:19 +0100
commit81d4cc13dcae2f159ed937d4ce41e1df7d3c82b0 (patch)
tree54afe69ec6c254d630d9425349cb41fb93c69d42 /web/html
parent1bc78b9dff5a1451007e28f9955deb1250c82d29 (diff)
downloadaur-81d4cc13dcae2f159ed937d4ce41e1df7d3c82b0.tar.gz
aur-81d4cc13dcae2f159ed937d4ce41e1df7d3c82b0.tar.xz
voters.php: Remove extra call to pkgname_from_id()
No need to store package ID and call pkgname_from_id() twice when the end goal is the package name. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r--web/html/voters.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/web/html/voters.php b/web/html/voters.php
index 9cedeef5..42fe2b58 100644
--- a/web/html/voters.php
+++ b/web/html/voters.php
@@ -4,8 +4,7 @@ include_once('aur.inc.php');
include_once('pkgfuncs.inc.php');
$SID = $_COOKIE['AURSID'];
-
-$pkgid = intval($_GET['ID']);
+$pkgname = pkgname_from_id(intval($_GET['ID']);
$votes = getvotes($pkgid);
$atype = account_from_sid($SID);
@@ -15,7 +14,7 @@ if ($atype == 'Trusted User' || $atype== 'Developer'):
?>
<div class="box">
- <h2>Votes for <a href="<?= get_pkg_uri(pkgname_from_id($pkgid)); ?>"><?= pkgname_from_id($pkgid) ?></a></h2>
+ <h2>Votes for <a href="<?= get_pkg_uri($pkgname); ?>"><?= $pkgname ?></a></h2>
<div class="boxbody">
<ul>
<?php while (list($indx, $row) = each($votes)): ?>