Mutualise code, introduce MAIN_ALL_TOWN_TO_UPPER
This commit is contained in:
parent
cb0f1bc6d4
commit
4d716e74bd
@ -569,6 +569,28 @@ abstract class CommonObject
|
|||||||
return dol_trunc($ret, $maxlen);
|
return dol_trunc($ret, $maxlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to upper or ucwords/lower if needed
|
||||||
|
*
|
||||||
|
* @return void;
|
||||||
|
*/
|
||||||
|
public function setUpperOrLowerCase()
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
if (!empty($conf->global->MAIN_FIRST_TO_UPPER)) {
|
||||||
|
$this->lastname = dol_ucwords(dol_strtolower($this->lastname));
|
||||||
|
$this->firstname = dol_ucwords(dol_strtolower($this->firstname));
|
||||||
|
$this->name = dol_ucwords(dol_strtolower($this->name));
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->MAIN_ALL_TO_UPPER)) {
|
||||||
|
$this->lastname = dol_strtoupper($this->lastname);
|
||||||
|
$this->name = dol_strtoupper($this->name);
|
||||||
|
}
|
||||||
|
if (!empty($conf->global->MAIN_ALL_TOWN_TO_UPPER)) {
|
||||||
|
$this->town = dol_strtoupper($this->town);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return clicable link of object (with eventually picto)
|
* Return clicable link of object (with eventually picto)
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user