Skip to content

Commit

Permalink
Update contact.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
BB2A-Anthony committed Dec 12, 2019
1 parent 380b698 commit 21a28e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions htdocs/contact/class/contact.class.php
Expand Up @@ -261,6 +261,7 @@ public function create($user)
$this->lastname = $this->lastname ?trim($this->lastname) : trim($this->name);
$this->firstname = trim($this->firstname);
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($this->socid)) $this->socid = 0;
if (empty($this->priv)) $this->priv = 0;
Expand Down Expand Up @@ -372,6 +373,10 @@ public function update($id, $user = null, $notrigger = 0, $action = 'update', $n
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);

// 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->firstname = trim($this->firstname);
$this->email = trim($this->email);
Expand Down

0 comments on commit 21a28e4

Please sign in to comment.