1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Don't do string concatenation in queryfx_all()

Summary: Searching for image macros was broken, and this fixes it.

Test Plan: load /macro/?name=test - the page loads instead of throwing an exception

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4658
This commit is contained in:
Nick Harper 2013-01-25 15:22:36 -08:00
parent 48c5356111
commit d980adfe3f

View file

@ -36,9 +36,9 @@ final class PhabricatorMacroListController
if ($has_search) {
$macros = queryfx_all(
$conn,
'SELECT m.*
FROM '.implode(' JOIN ', $join).'
WHERE '.implode(' AND ', $where));
'SELECT m.* FROM %Q WHERE %Q',
implode(' JOIN ', $join),
implode(' AND ', $where));
$macros = $macro_table->loadAllFromArray($macros);
$nodata = pht('There are no macros matching the filter.');
} else {