Fix phpcs

This commit is contained in:
Laurent Destailleur 2021-05-17 11:29:51 +02:00
parent f25c57b1f6
commit 1b25c4daa0
4 changed files with 11 additions and 11 deletions

View File

@ -26,7 +26,7 @@ if (!empty($extrafieldsobjectkey) && !empty($search_array_options) && is_array($
if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp'))) { if ($crit != '' && in_array($typ, array('date', 'datetime', 'timestamp'))) {
if (is_numeric($crit)) { if (is_numeric($crit)) {
if ($typ == 'date'){ if ($typ == 'date') {
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
$crit = dol_get_first_hour($crit); $crit = dol_get_first_hour($crit);
} }

View File

@ -183,7 +183,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$this->error = "ErrorLDAP ".$ldap->error; $this->error = "ErrorLDAP ".$ldap->error;
} }
} }
/*} elseif ($action == 'USER_SETINGROUP') { /*} elseif ($action == 'USER_SETINGROUP') {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') {
$ldap = new Ldap(); $ldap = new Ldap();
@ -217,7 +217,7 @@ class InterfaceLdapsynchro extends DolibarrTriggers
$this->error = "ErrorLDAP ".$ldap->error; $this->error = "ErrorLDAP ".$ldap->error;
} }
} }
} elseif ($action == 'USER_REMOVEFROMGROUP') { } elseif ($action == 'USER_REMOVEFROMGROUP') {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') { if (!empty($conf->global->LDAP_SYNCHRO_ACTIVE) && $conf->global->LDAP_SYNCHRO_ACTIVE === 'dolibarr2ldap') {
$ldap = new Ldap(); $ldap = new Ldap();

View File

@ -855,10 +855,10 @@ class UserGroup extends CommonObject
$valueofldapfield[] = $muser->_load_ldap_dn($info2); $valueofldapfield[] = $muser->_load_ldap_dn($info2);
} }
$info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield) ? $valueofldapfield : ''); $info[$conf->global->LDAP_GROUP_FIELD_GROUPMEMBERS] = (!empty($valueofldapfield) ? $valueofldapfield : '');
} }
if (!empty($conf->global->LDAP_GROUP_FIELD_GROUPID)) { if (!empty($conf->global->LDAP_GROUP_FIELD_GROUPID)) {
$info[$conf->global->LDAP_GROUP_FIELD_GROUPID] = $this->id; $info[$conf->global->LDAP_GROUP_FIELD_GROUPID] = $this->id;
} }
return $info; return $info;
} }

View File

@ -2394,12 +2394,12 @@ if ($action == 'generatesitemaps' && $usercanedit) {
// TODO When adding and when not ? // TODO When adding and when not ?
/*<news:news> /*<news:news>
<news:publication> <news:publication>
<news:name>The Example Times</news:name> <news:name>The Example Times</news:name>
<news:language>en</news:language> <news:language>en</news:language>
</news:publication> </news:publication>
<news:publication_date>2008-12-23</news:publication_date> <news:publication_date>2008-12-23</news:publication_date>
<news:title>Companies A, B in Merger Talks</news:title> <news:title>Companies A, B in Merger Talks</news:title>
</news:news> </news:news>
*/ */
$root->appendChild($url); $root->appendChild($url);