--- web/lib/pkgfuncs.inc.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php index 0610617..969da11 100644 --- a/web/lib/pkgfuncs.inc.php +++ b/web/lib/pkgfuncs.inc.php @@ -215,11 +215,10 @@ function add_package_comment($pkgid, $uid, $comment, $dbh=NULL) { db_query($q, $dbh); # Send email notifications - $q = 'SELECT CommentNotify.*, Users.Email '; - $q.= 'FROM CommentNotify, Users '; - $q.= 'WHERE Users.ID = CommentNotify.UserID '; - $q.= 'AND CommentNotify.UserID != ' . $uid . ' '; - $q.= 'AND CommentNotify.PkgID = ' . intval($pkgid); + $q = 'SELECT u.Email FROM Users u '; + $q.= 'INNER JOIN CommentNotify cn ON u.ID=cn.UserID'; + $q.= 'AND cn.UserID != ' . $uid . ' '; + $q.= 'AND cn.PkgID = ' . intval($pkgid); $result = db_query($q, $dbh); $bcc = array(); @@ -228,7 +227,7 @@ function add_package_comment($pkgid, $uid, $comment, $dbh=NULL) { array_push($bcc, $row['Email']); } - $q = 'SELECT Packages.* '; + $q = 'SELECT Packages.Name '; $q.= 'FROM Packages '; $q.= 'WHERE Packages.ID = ' . intval($pkgid); $result = db_query($q, $dbh); -- 1.7.11.3