Clean code

This commit is contained in:
Laurent Destailleur 2021-06-22 11:38:02 +02:00
parent 8887f71c26
commit 312968eeac

View File

@ -382,6 +382,7 @@ class ActionComm extends CommonObject
*/
const EVENT_FINISHED = 100;
/**
* Constructor
*
@ -752,7 +753,7 @@ class ActionComm extends CommonObject
$sql .= " a.durationp,"; // deprecated
$sql .= " a.datec,";
$sql .= " a.tms as datem,";
$sql .= " a.code, a.label, a.note,";
$sql .= " a.code, a.label, a.note as note_private,";
$sql .= " a.fk_soc,";
$sql .= " a.fk_project,";
$sql .= " a.fk_user_author, a.fk_user_mod,";
@ -811,8 +812,8 @@ class ActionComm extends CommonObject
$this->datec = $this->db->jdate($obj->datec);
$this->datem = $this->db->jdate($obj->datem);
$this->note = $obj->note; // deprecated
$this->note_private = $obj->note;
$this->note = $obj->note_private; // deprecated
$this->note_private = $obj->note_private;
$this->percentage = $obj->percentage;
$this->authorid = $obj->fk_user_author;
@ -1822,7 +1823,7 @@ class ActionComm extends CommonObject
$sql .= " a.datep2,"; // End
$sql .= " a.durationp,"; // deprecated
$sql .= " a.datec, a.tms as datem,";
$sql .= " a.label, a.code, a.note, a.fk_action as type_id,";
$sql .= " a.label, a.code, a.note as note_private, a.fk_action as type_id,";
$sql .= " a.fk_soc,";
$sql .= " a.fk_user_author, a.fk_user_mod,";
$sql .= " a.fk_user_action,";
@ -1950,7 +1951,7 @@ class ActionComm extends CommonObject
$duration = ($datestart && $dateend) ? ($dateend - $datestart) : 0;
$event['summary'] = $obj->label.($obj->socname ? " (".$obj->socname.")" : "");
$event['desc'] = $obj->note;
$event['desc'] = $obj->note_private;
$event['startdate'] = $datestart;
$event['enddate'] = $dateend; // Not required with type 'journal'
$event['duration'] = $duration; // Not required with type 'journal'