Merge pull request #12697 from bb2a/patch-7
Full name in uppercase on creation and modification
This commit is contained in:
commit
8b57e9fcf0
@ -261,6 +261,7 @@ class Contact extends CommonObject
|
|||||||
$this->lastname = $this->lastname ?trim($this->lastname) : trim($this->name);
|
$this->lastname = $this->lastname ?trim($this->lastname) : trim($this->name);
|
||||||
$this->firstname = trim($this->firstname);
|
$this->firstname = trim($this->firstname);
|
||||||
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname = ucwords($this->lastname);
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname = ucwords($this->lastname);
|
||||||
|
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->lastname = strtoupper($this->lastname);
|
||||||
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname = ucwords($this->firstname);
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname = ucwords($this->firstname);
|
||||||
if (empty($this->socid)) $this->socid = 0;
|
if (empty($this->socid)) $this->socid = 0;
|
||||||
if (empty($this->priv)) $this->priv = 0;
|
if (empty($this->priv)) $this->priv = 0;
|
||||||
@ -372,6 +373,10 @@ class Contact extends CommonObject
|
|||||||
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
|
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname = ucwords($this->lastname);
|
||||||
|
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->lastname = strtoupper($this->lastname);
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname = ucwords($this->firstname);
|
||||||
|
|
||||||
$this->lastname = trim($this->lastname) ?trim($this->lastname) : trim($this->lastname);
|
$this->lastname = trim($this->lastname) ?trim($this->lastname) : trim($this->lastname);
|
||||||
$this->firstname = trim($this->firstname);
|
$this->firstname = trim($this->firstname);
|
||||||
$this->email = trim($this->email);
|
$this->email = trim($this->email);
|
||||||
|
|||||||
@ -673,6 +673,7 @@ class Societe extends CommonObject
|
|||||||
if (empty($this->status)) $this->status = 0;
|
if (empty($this->status)) $this->status = 0;
|
||||||
$this->name = $this->name ?trim($this->name) : trim($this->nom);
|
$this->name = $this->name ?trim($this->name) : trim($this->nom);
|
||||||
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = ucwords($this->name);
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = ucwords($this->name);
|
||||||
|
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->name=strtoupper($this->name);
|
||||||
$this->nom = $this->name; // For backward compatibility
|
$this->nom = $this->name; // For backward compatibility
|
||||||
if (empty($this->client)) $this->client = 0;
|
if (empty($this->client)) $this->client = 0;
|
||||||
if (empty($this->fournisseur)) $this->fournisseur = 0;
|
if (empty($this->fournisseur)) $this->fournisseur = 0;
|
||||||
@ -988,6 +989,8 @@ class Societe extends CommonObject
|
|||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->name = ucwords($this->name);
|
||||||
|
if (! empty($conf->global->MAIN_ALL_TO_UPPER)) $this->name=strtoupper($this->name);
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
|
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
|
||||||
|
|||||||
@ -1175,6 +1175,11 @@ class User extends CommonObject
|
|||||||
global $mysoc;
|
global $mysoc;
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
|
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords($this->lastname);
|
||||||
|
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->lastname=strtoupper($this->lastname);
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
|
||||||
|
|
||||||
$this->login = trim($this->login);
|
$this->login = trim($this->login);
|
||||||
if (!isset($this->entity)) $this->entity = $conf->entity; // If not defined, we use default value
|
if (!isset($this->entity)) $this->entity = $conf->entity; // If not defined, we use default value
|
||||||
|
|
||||||
@ -1513,6 +1518,11 @@ class User extends CommonObject
|
|||||||
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
|
dol_syslog(get_class($this)."::update notrigger=".$notrigger.", nosyncmember=".$nosyncmember.", nosyncmemberpass=".$nosyncmemberpass);
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
|
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords($this->lastname);
|
||||||
|
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) $this->lastname=strtoupper($this->lastname);
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
|
||||||
|
|
||||||
$this->lastname = trim($this->lastname);
|
$this->lastname = trim($this->lastname);
|
||||||
$this->firstname = trim($this->firstname);
|
$this->firstname = trim($this->firstname);
|
||||||
$this->employee = $this->employee ? $this->employee : 0;
|
$this->employee = $this->employee ? $this->employee : 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user