summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/lib/pkgfuncs.inc.php11
-rw-r--r--web/template/pkg_details.php5
-rw-r--r--web/template/pkgbase_details.php4
3 files changed, 11 insertions, 9 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index f800e343..a6fa32e4 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -395,11 +395,12 @@ function pkg_name_is_blacklisted($name) {
function pkg_get_details($id=0) {
$dbh = DB::connect();
- $q = "SELECT Packages.*, PackageBases.Name AS BaseName, ";
- $q.= "PackageBases.CategoryID, PackageBases.NumVotes, ";
- $q.= "PackageBases.OutOfDateTS, PackageBases.SubmittedTS, ";
- $q.= "PackageBases.ModifiedTS, PackageBases.SubmitterUID, ";
- $q.= "PackageBases.MaintainerUID, PackageCategories.Category ";
+ $q = "SELECT Packages.*, PackageBases.ID AS BaseID, ";
+ $q.= "PackageBases.Name AS BaseName, PackageBases.CategoryID, ";
+ $q.= "PackageBases.NumVotes, PackageBases.OutOfDateTS, ";
+ $q.= "PackageBases.SubmittedTS, PackageBases.ModifiedTS, ";
+ $q.= "PackageBases.SubmitterUID, PackageBases.MaintainerUID, ";
+ $q.= "PackageCategories.Category ";
$q.= "FROM Packages, PackageBases, PackageCategories ";
$q.= "WHERE PackageBases.ID = Packages.PackageBaseID ";
$q.= "AND PackageBases.CategoryID = PackageCategories.ID ";
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']) ?>" />