FIX php8 compatibility
This commit is contained in:
parent
2b96fbaee6
commit
dd00484a9c
@ -1731,13 +1731,13 @@ class Holiday extends CommonObject
|
||||
if ($type) {
|
||||
// If user of Dolibarr
|
||||
$sql = "SELECT";
|
||||
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
$sql .= " DISTINCT";
|
||||
}
|
||||
$sql .= " u.rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
|
||||
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||
$sql .= " WHERE ((ug.fk_user = u.rowid";
|
||||
$sql .= " AND ug.entity IN (".getEntity('usergroup')."))";
|
||||
@ -1821,13 +1821,13 @@ class Holiday extends CommonObject
|
||||
if ($type) {
|
||||
// If we need users of Dolibarr
|
||||
$sql = "SELECT";
|
||||
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
$sql .= " DISTINCT";
|
||||
}
|
||||
$sql .= " u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
|
||||
if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
if (isModEnabled('multicompany') && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||
$sql .= ", ".MAIN_DB_PREFIX."usergroup_user as ug";
|
||||
$sql .= " WHERE ((ug.fk_user = u.rowid";
|
||||
$sql .= " AND ug.entity IN (".getEntity('usergroup')."))";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user