Fix WHERE clause for keyword search queries with empty keywords
commitbc972089a158459005700a7eaa8cee3ba666e2d1
authorJakub Klinkovský <j.l.k@gmx.com>
Sat, 5 Sep 2020 20:15:22 +0000 (5 22:15 +0200)
committerLukas Fleischer <lfleischer@archlinux.org>
Sat, 20 Feb 2021 16:25:21 +0000 (20 11:25 -0500)
tree9bac58da68eae83354c45bc72563267d76061f5d
parent3062a78a92d32144f423fdb460e96a309732d9d0
Fix WHERE clause for keyword search queries with empty keywords

When the keyword parameter is empty, the AND clause has to be omitted,
otherwise we get an SQL syntax error:

... WHERE PackageBases.PackagerUID IS NOT NULL AND () ...

This got broken in commit 9e30013aa4fc6ce3a3c9f6f83a6fe789c1fc2456
Author: Kevin Morris <kevr.gtalk@gmail.com>
Date:   Sun Jul 5 18:19:06 2020 -0700

Support conjunctive keyword search in RPC interface

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
web/lib/pkgfuncs.inc.php