RPC: Fix info queries when using package IDs

Info queries using package IDs were no longer working due to commit
c6d84b3a8d, which introduced a table join
in process_query(), thus making the "ID" column ambiguous. Fix this by
explicitly specifying the table to use. Fixes FS#25696.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-08-22 08:17:26 +02:00
parent dad42297c7
commit 53a31865f4

View file

@ -203,7 +203,7 @@ class AurJSON {
// just using sprintf to coerce the pqd to an int // just using sprintf to coerce the pqd to an int
// should handle sql injection issues, since sprintf will // should handle sql injection issues, since sprintf will
// bork if not an int, or convert the string to a number 0 // bork if not an int, or convert the string to a number 0
$where_condition = "ID={$pqdata}"; $where_condition = "Packages.ID={$pqdata}";
} }
else { else {
$where_condition = sprintf("Name=\"%s\"", $where_condition = sprintf("Name=\"%s\"",