Skip to content

Commit

Permalink
Update website.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic34 committed Feb 13, 2019
1 parent 749c7d9 commit e9d370e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions htdocs/website/class/website.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function create(User $user, $notrigger = false)

// Clean parameters
if (isset($this->entity)) {
$this->entity = trim($this->entity);
$this->entity = (int) $this->entity;
}
if (isset($this->ref)) {
$this->ref = trim($this->ref);
Expand All @@ -132,7 +132,7 @@ public function create(User $user, $notrigger = false)
$this->description = trim($this->description);
}
if (isset($this->status)) {
$this->status = trim($this->status);
$this->status = (int) $this->status;
}
if (empty($this->date_creation)) {
$this->date_creation = $now;
Expand Down Expand Up @@ -388,7 +388,7 @@ public function update(User $user, $notrigger = false)
// Clean parameters

if (isset($this->entity)) {
$this->entity = trim($this->entity);
$this->entity = (int) $this->entity;
}
if (isset($this->ref)) {
$this->ref = trim($this->ref);
Expand All @@ -397,7 +397,7 @@ public function update(User $user, $notrigger = false)
$this->description = trim($this->description);
}
if (isset($this->status)) {
$this->status = trim($this->status);
$this->status = (int) $this->status;
}

// Check parameters
Expand Down Expand Up @@ -519,7 +519,7 @@ public function delete(User $user, $notrigger = false)
*/
public function createFromClone($user, $fromid, $newref, $newlang = '')
{
global $hookmanager, $langs;
global $conf, $hookmanager, $langs;
global $dolibarr_main_data_root;

$now = dol_now();
Expand Down

0 comments on commit e9d370e

Please sign in to comment.