Fix vote/notify link on the package details page

Call pkgbase_user_voted() and pkgbase_user_notify() using the package
base ID instead of using the package ID.

Fixes FS#40165.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-05-01 09:27:06 +02:00
parent 05f88b28b8
commit e161c4f94b
3 changed files with 11 additions and 9 deletions

View file

@ -49,7 +49,7 @@ $pkgs = pkgbase_get_pkgnames($base_id);
</form>
</li>
<?php endif; ?>
<?php if (pkgbase_user_voted($uid, $row['ID'])): ?>
<?php if (pkgbase_user_voted($uid, $base_id)): ?>
<li>
<form action="<?= get_pkgbase_uri($row['Name']) . 'unvote/'; ?>" method="post">
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
@ -64,7 +64,7 @@ $pkgs = pkgbase_get_pkgnames($base_id);
</form>
</li>
<?php endif; ?>
<?php if (pkgbase_user_notify($uid, $row['ID'])): ?>
<?php if (pkgbase_user_notify($uid, $base_id)): ?>
<li>
<form action="<?= get_pkgbase_uri($row['Name']) . 'unnotify/'; ?>" method="post">
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />