Fix phpcs

This commit is contained in:
Laurent Destailleur 2022-04-29 19:30:04 +02:00
parent 6a2526ae65
commit 316ef3371d

View File

@ -227,7 +227,9 @@ if ($action == 'getProducts') {
// Add fields from hooks // Add fields from hooks
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters);
if ($reshook >= 0) {
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
}
$sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
if (getDolGlobalInt('TAKEPOS_PRODUCT_IN_STOCK') == 1) { if (getDolGlobalInt('TAKEPOS_PRODUCT_IN_STOCK') == 1) {
@ -239,7 +241,9 @@ 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);
if ($reshook >= 0) {
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
}
$sql .= ' WHERE entity IN ('.getEntity('product').')'; $sql .= ' WHERE entity IN ('.getEntity('product').')';
if ($filteroncategids) { if ($filteroncategids) {
@ -253,7 +257,9 @@ if ($action == 'getProducts') {
// Add where from hooks // Add where from hooks
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters);
if ($reshook >= 0) {
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
}
// load only one page of products // load only one page of products
$sql.= $db->plimit($search_limit, $search_start); $sql.= $db->plimit($search_limit, $search_start);