mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
1bc78b9dff
commit
81d4cc13dc
1 changed files with 2 additions and 3 deletions
|
@ -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)): ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue