fix phpstan

This commit is contained in:
guthub 2025-01-03 14:56:16 +01:00
parent e071263718
commit 718ead7c14

View File

@ -264,7 +264,7 @@ $sqlfields = $sql; // $sql fields to remove for count total
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
if ($object->ismultientitymanaged == 1 || $object->ismultientitymanaged != '') { // value is fk_bookcal_calendar@bookcal_calendar
$sql .= ", ".MAIN_DB_PREFIX."bookcal_calendar as bc";
$sql .= ", ".MAIN_DB_PREFIX."bookcal_calendar as bc";
}
//$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."anothertable as rc ON rc.parent = t.rowid";
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
@ -275,8 +275,8 @@ $parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
if ($object->ismultientitymanaged == 1 || $object->ismultientitymanaged != '') { // value is fk_bookcal_calendar@bookcal_calendar
$sql .= " WHERE bc.rowid = t.fk_bookcal_calendar";
$sql .= " AND bc.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")";
$sql .= " WHERE bc.rowid = t.fk_bookcal_calendar";
$sql .= " AND bc.entity IN (".getEntity($object->element, (GETPOSTINT('search_current_entity') ? 0 : 1)).")";
} else {
$sql .= " WHERE 1 = 1";
}