diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-05-01 09:27:06 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-05-01 09:29:55 +0200 |
commit | e161c4f94b75b26f115f6953cdc67a543cf89ec2 (patch) | |
tree | bbd2d674408903ba6879f5fd9685e10366d7de5c /web/template | |
parent | 05f88b28b8ed8941bd97537a3c31c4e766b61493 (diff) | |
download | aur-e161c4f94b75b26f115f6953cdc67a543cf89ec2.tar.gz aur-e161c4f94b75b26f115f6953cdc67a543cf89ec2.tar.xz |
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>
Diffstat (limited to 'web/template')
-rw-r--r-- | web/template/pkg_details.php | 5 | ||||
-rw-r--r-- | web/template/pkgbase_details.php | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php index 7836596f..791c9ee5 100644 --- a/web/template/pkg_details.php +++ b/web/template/pkg_details.php @@ -3,6 +3,7 @@ $atype = account_from_sid($SID); $uid = uid_from_sid($SID); $pkgid = intval($row['ID']); +$base_id = intval($row['BaseID']); $catarr = pkgbase_categories(); @@ -73,7 +74,7 @@ $sources = pkg_sources($row["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['BaseName']) . 'unvote/'; ?>" method="post"> <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> @@ -88,7 +89,7 @@ $sources = pkg_sources($row["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['BaseName']) . 'unnotify/'; ?>" method="post"> <input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" /> diff --git a/web/template/pkgbase_details.php b/web/template/pkgbase_details.php index 83b474c7..fd7bdadb 100644 --- a/web/template/pkgbase_details.php +++ b/web/template/pkgbase_details.php @@ -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']) ?>" /> |