FIX #24278
This commit is contained in:
parent
89d25eae96
commit
a06815ac29
@ -1589,16 +1589,17 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public function fetch($rowid)
|
public function fetch($rowid)
|
||||||
{
|
{
|
||||||
|
dol_syslog("FichinterLigne::fetch", LOG_DEBUG);
|
||||||
|
|
||||||
$sql = 'SELECT ft.rowid, ft.fk_fichinter, ft.description, ft.duree, ft.rang, ft.date';
|
$sql = 'SELECT ft.rowid, ft.fk_fichinter, ft.description, ft.duree, ft.rang, ft.date';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft';
|
||||||
$sql .= ' WHERE ft.rowid = '.((int) $rowid);
|
$sql .= ' WHERE ft.rowid = '.((int) $rowid);
|
||||||
|
|
||||||
dol_syslog("FichinterLigne::fetch", LOG_DEBUG);
|
$resql = $this->db->query($sql);
|
||||||
$result = $this->db->query($sql);
|
if ($resql) {
|
||||||
if ($result) {
|
$objp = $this->db->fetch_object($resql);
|
||||||
$objp = $this->db->fetch_object($result);
|
|
||||||
$this->rowid = $objp->rowid;
|
$this->rowid = $objp->rowid;
|
||||||
$this->id = $objp->rowid;
|
$this->id = $objp->rowid;
|
||||||
$this->fk_fichinter = $objp->fk_fichinter;
|
$this->fk_fichinter = $objp->fk_fichinter;
|
||||||
$this->date = $this->db->jdate($objp->date);
|
$this->date = $this->db->jdate($objp->date);
|
||||||
$this->datei = $this->db->jdate($objp->date); // For backward compatibility
|
$this->datei = $this->db->jdate($objp->date); // For backward compatibility
|
||||||
@ -1606,7 +1607,10 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
$this->duration = $objp->duree;
|
$this->duration = $objp->duree;
|
||||||
$this->rang = $objp->rang;
|
$this->rang = $objp->rang;
|
||||||
|
|
||||||
$this->db->free($result);
|
$this->db->free($resql);
|
||||||
|
|
||||||
|
$this->fetch_optionals();
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->error().' sql='.$sql;
|
$this->error = $this->db->error().' sql='.$sql;
|
||||||
@ -1623,8 +1627,6 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public function insert($user, $notrigger = 0)
|
public function insert($user, $notrigger = 0)
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
dol_syslog("FichinterLigne::insert rang=".$this->rang);
|
dol_syslog("FichinterLigne::insert rang=".$this->rang);
|
||||||
@ -1714,8 +1716,6 @@ class FichinterLigne extends CommonObjectLine
|
|||||||
*/
|
*/
|
||||||
public function update($user, $notrigger = 0)
|
public function update($user, $notrigger = 0)
|
||||||
{
|
{
|
||||||
global $langs, $conf;
|
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (empty($this->date) && !empty($this->datei)) { // For backward compatibility
|
if (empty($this->date) && !empty($this->datei)) { // For backward compatibility
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user