Fix pkgbase_votes_from_name()

In 676595f (Prefix package functions with pkg_/pkgbase_, 2014-04-05),
votes_for_pkgname() was renamed to pkgbase_votes_from_name() without
changing the semantics. Slightly adapt the implementation and interpret
the argument as a package base name instead of a package name. Also fix
the call site.

Reported-by: Felix Yan <felixonmars@gmail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-07-16 17:21:08 +02:00
parent e9b13cef3f
commit d03f7a890f
2 changed files with 13 additions and 12 deletions

View file

@ -1,11 +1,11 @@
<?php
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
include_once('aur.inc.php');
include_once('pkgfuncs.inc.php');
include_once('pkgbasefuncs.inc.php');
$SID = $_COOKIE['AURSID'];
$pkgname = htmlspecialchars($_GET['N']);
$votes = pkgbase_votes_from_name($pkgname);
$pkgbase_name = htmlspecialchars($_GET['N']);
$votes = pkgbase_votes_from_name($pkgbase_name);
html_header(__("Voters"));
@ -13,7 +13,7 @@ if (has_credential(CRED_PKGBASE_LIST_VOTERS)):
?>
<div class="box">
<h2>Votes for <a href="<?= get_pkg_uri($pkgname); ?>"><?= $pkgname ?></a></h2>
<h2>Votes for <a href="<?= get_pkgbase_uri($pkgbase_name); ?>"><?= $pkgbase_name ?></a></h2>
<div class="boxbody">
<ul>
<?php while (list($indx, $row) = each($votes)): ?>