Fix update tms
This commit is contained in:
parent
7760594643
commit
dfb49fc47b
@ -208,7 +208,7 @@ class Website extends CommonObject
|
||||
$sql .= " t.fk_user_create,";
|
||||
$sql .= " t.fk_user_modif,";
|
||||
$sql .= " t.date_creation,";
|
||||
$sql .= " t.tms";
|
||||
$sql .= " t.tms as date_modification";
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t';
|
||||
if (null !== $ref) {
|
||||
$sql .= " WHERE t.ref = '" . $this->db->escape($ref) . "'";
|
||||
@ -233,7 +233,7 @@ class Website extends CommonObject
|
||||
$this->fk_user_create = $obj->fk_user_create;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$this->tms = $this->db->jdate($obj->tms);
|
||||
$this->date_modification = $this->db->jdate($obj->date_modification);
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
@ -277,7 +277,7 @@ class Website extends CommonObject
|
||||
$sql .= " t.fk_user_create,";
|
||||
$sql .= " t.fk_user_modif,";
|
||||
$sql .= " t.date_creation,";
|
||||
$sql .= " t.tms";
|
||||
$sql .= " t.tms as date_modification";
|
||||
$sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element. ' as t';
|
||||
|
||||
// Manage filter
|
||||
@ -317,7 +317,7 @@ class Website extends CommonObject
|
||||
$this->fk_user_create = $obj->fk_user_create;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
$line->date_creation = $this->db->jdate($obj->date_creation);
|
||||
$line->tms = $this->db->jdate($obj->tms);
|
||||
$line->date_modification = $this->db->jdate($obj->date_modification);
|
||||
|
||||
$this->records[$line->id] = $line;
|
||||
}
|
||||
@ -373,8 +373,8 @@ class Website extends CommonObject
|
||||
$sql .= ' fk_default_home = '.(($this->fk_default_home > 0)?$this->fk_default_home:"null").',';
|
||||
$sql .= ' virtualhost = '.(($this->virtualhost != '')?"'".$this->db->escape($this->virtualhost)."'":"null").',';
|
||||
$sql .= ' fk_user_modif = '.(! isset($this->fk_user_modif) ? $user->id : $this->fk_user_modif).',';
|
||||
$sql .= ' date_creation = '.(! isset($this->date_creation) || dol_strlen($this->date_creation) != 0 ? "'".$this->db->idate($this->date_creation)."'" : 'null').',';
|
||||
$sql .= ' tms = '.(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : "'".$this->db->idate(dol_now())."'");
|
||||
$sql .= ' date_creation = '.(! isset($this->date_creation) || dol_strlen($this->date_creation) != 0 ? "'".$this->db->idate($this->date_creation)."'" : 'null');
|
||||
$sql .= ', tms = '.(dol_strlen($this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : "'".$this->db->idate(dol_now())."'");
|
||||
$sql .= ' WHERE rowid=' . $this->id;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -381,8 +381,8 @@ class WebsitePage extends CommonObject
|
||||
$sql .= ' keywords = '.(isset($this->keywords)?"'".$this->db->escape($this->keywords)."'":"null").',';
|
||||
$sql .= ' content = '.(isset($this->content)?"'".$this->db->escape($this->content)."'":"null").',';
|
||||
$sql .= ' status = '.(isset($this->status)?$this->status:"null").',';
|
||||
$sql .= ' date_creation = '.(! isset($this->date_creation) || dol_strlen($this->date_creation) != 0 ? "'".$this->db->idate($this->date_creation)."'" : 'null').',';
|
||||
//$sql .= ' tms = '.(dol_strlen($this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : "'".$this->db->idate(dol_now())."'");
|
||||
$sql .= ' date_creation = '.(! isset($this->date_creation) || dol_strlen($this->date_creation) != 0 ? "'".$this->db->idate($this->date_creation)."'" : 'null');
|
||||
$sql .= ', tms = '.(dol_strlen($this->date_modification) != 0 ? "'".$this->db->idate($this->date_modification)."'" : "'".$this->db->idate(dol_now())."'");
|
||||
$sql .= ' WHERE rowid=' . $this->id;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user