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:
@@ -36,9 +36,9 @@ final class PhabricatorMacroListController
|
|||||||
if ($has_search) {
|
if ($has_search) {
|
||||||
$macros = queryfx_all(
|
$macros = queryfx_all(
|
||||||
$conn,
|
$conn,
|
||||||
'SELECT m.*
|
'SELECT m.* FROM %Q WHERE %Q',
|
||||||
FROM '.implode(' JOIN ', $join).'
|
implode(' JOIN ', $join),
|
||||||
WHERE '.implode(' AND ', $where));
|
implode(' AND ', $where));
|
||||||
$macros = $macro_table->loadAllFromArray($macros);
|
$macros = $macro_table->loadAllFromArray($macros);
|
||||||
$nodata = pht('There are no macros matching the filter.');
|
$nodata = pht('There are no macros matching the filter.');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user