Fix regression that stopped maintainers from pinning comments

In commit 8c98db0b82 support was added for
package co-maintainers to pin comments in addition to maintainers.

Due to a typo, the SQL query was reset halfway through and only added
the co-maintainer IDs to the list of allowed users.

Fixes FS#56783.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Eli Schwartz 2017-12-20 22:27:43 -05:00 committed by Lukas Fleischer
parent a04fe6a13e
commit ac29097ce8

View file

@ -100,7 +100,7 @@ function can_pin_comment($comment_id=0) {
$q.= "LEFT JOIN PackageComments AS pc ON pb.ID = pc.PackageBaseID ";
$q.= "WHERE pc.ID = " . intval($comment_id) . " ";
$q.= "UNION ";
$q = "SELECT pcm.UsersID FROM PackageComaintainers AS pcm ";
$q.= "SELECT pcm.UsersID FROM PackageComaintainers AS pcm ";
$q.= "LEFT JOIN PackageComments AS pc ";
$q.= "ON pcm.PackageBaseID = pc.PackageBaseID ";
$q.= "WHERE pc.ID = " . intval($comment_id);