fix commit

This commit is contained in:
melina 2022-04-28 08:39:02 +02:00
parent db3edba578
commit 0c8a6bd6f0

View File

@ -218,7 +218,7 @@ if ($action == 'getProducts') {
// Add tables from hooks // Add tables from hooks
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListTables', $parameters); $reshook=$hookmanager->executeHooks('printFieldListTables', $parameters);
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
$sql .= ' WHERE entity IN ('.getEntity('product').')'; $sql .= ' WHERE entity IN ('.getEntity('product').')';
@ -229,7 +229,7 @@ if ($action == 'getProducts') {
$sql .= natural_search(array('ref', 'label', 'barcode'), $term); $sql .= natural_search(array('ref', 'label', 'barcode'), $term);
// Add where from hooks // Add where from hooks
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); $reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters);
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
$resql = $db->query($sql); $resql = $db->query($sql);
@ -269,9 +269,11 @@ if ($action == 'getProducts') {
); );
// Add entries to row from hooks // Add entries to row from hooks
$parameters=array(); $parameters=array();
$parameters['row'] = end($rows); $parameters['row'] = $row;
$parameters['obj'] = $obj; $parameters['obj'] = $obj;
$reshook=$hookmanager->executeHooks('completeAjaxReturnArray', $parameters); $hookmanager->executeHooks('completeAjaxReturnArray', $parameters);
if (!empty($hookmanager->resArray)) $row = $hookmanager->resArray;
$rows[] = $row;
} }
echo json_encode($rows); echo json_encode($rows);
} else { } else {