actioncomm note deprecated
This commit is contained in:
parent
b971aabf3c
commit
4220d6b253
@ -380,7 +380,7 @@ class ActionComm extends CommonObject
|
||||
// Clean parameters
|
||||
$this->label = dol_trunc(trim($this->label), 128);
|
||||
$this->location = dol_trunc(trim($this->location), 128);
|
||||
$this->note = dol_htmlcleanlastbr(trim($this->note));
|
||||
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
|
||||
if (empty($this->percentage)) $this->percentage = 0;
|
||||
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
|
||||
if (empty($this->fulldayevent)) $this->fulldayevent = 0;
|
||||
@ -488,7 +488,7 @@ class ActionComm extends CommonObject
|
||||
$sql .= ($this->ref_ext ? ("'".$this->db->idate($this->ref_ext)."'") : "null").", ";
|
||||
$sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", ";
|
||||
$sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", ";
|
||||
$sql .= " '".$this->db->escape($this->note_private ? $this->note_private : $this->note)."', ";
|
||||
$sql .= " '".$this->db->escape($this->note_private)."', ";
|
||||
$sql .= ((isset($this->contactid) && $this->contactid > 0) ? $this->contactid : "null").", ";
|
||||
$sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", ";
|
||||
$sql .= ($userownerid > 0 ? $userownerid : "null").", ";
|
||||
@ -993,7 +993,7 @@ class ActionComm extends CommonObject
|
||||
|
||||
// Clean parameters
|
||||
$this->label = trim($this->label);
|
||||
$this->note = trim($this->note);
|
||||
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
|
||||
if (empty($this->percentage)) $this->percentage = 0;
|
||||
if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0;
|
||||
if (empty($this->transparency)) $this->transparency = 0;
|
||||
@ -1027,7 +1027,7 @@ class ActionComm extends CommonObject
|
||||
$sql .= ", datep = ".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null');
|
||||
$sql .= ", datep2 = ".(strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : 'null');
|
||||
$sql .= ", durationp = ".(isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '' ? "'".$this->db->escape($this->durationp)."'" : "null"); // deprecated
|
||||
$sql .= ", note = '".$this->db->escape($this->note_private ? $this->note_private : $this->note)."'";
|
||||
$sql .= ", note = '".$this->db->escape($this->note_private)."'";
|
||||
$sql .= ", fk_project =".($this->fk_project > 0 ? $this->fk_project : "null");
|
||||
$sql .= ", fk_soc =".($socid > 0 ? $socid : "null");
|
||||
$sql .= ", fk_contact =".($contactid > 0 ? $contactid : "null");
|
||||
@ -1406,8 +1406,8 @@ class ActionComm extends CommonObject
|
||||
$tooltip .= '<br><b>'.$langs->trans('Type').':</b> '.$labeltype;
|
||||
if (!empty($this->location))
|
||||
$tooltip .= '<br><b>'.$langs->trans('Location').':</b> '.$this->location;
|
||||
if (!empty($this->note))
|
||||
$tooltip .= '<br><b>'.$langs->trans('Note').':</b> '.(dol_textishtml($this->note) ? str_replace(array("\r", "\n"), "", $this->note) : str_replace(array("\r", "\n"), '<br>', $this->note));
|
||||
if (!empty($this->note_private))
|
||||
$tooltip .= '<br><b>'.$langs->trans('Note').':</b> '.(dol_textishtml($this->note_private) ? str_replace(array("\r", "\n"), "", $this->note_private) : str_replace(array("\r", "\n"), '<br>', $this->note_private));
|
||||
$linkclose = '';
|
||||
if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color)
|
||||
$linkclose = ' style="background-color:#'.$this->type_color.'"';
|
||||
@ -1940,8 +1940,7 @@ class ActionComm extends CommonObject
|
||||
$this->location = 'Location';
|
||||
$this->transparency = 1; // 1 means opaque
|
||||
$this->priority = 1;
|
||||
$this->note = "This is a 'public' note";
|
||||
$this->note_public = "This is a 'public' note.";
|
||||
//$this->note_public = "This is a 'public' note.";
|
||||
$this->note_private = "This is a 'private' note.";
|
||||
|
||||
$this->userownerid = $user->id;
|
||||
|
||||
@ -140,7 +140,7 @@ class ActionCommTest extends PHPUnit\Framework\TestCase
|
||||
$localobject->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
|
||||
$localobject->code = 'AC_PHPUNITTEST';
|
||||
$localobject->label = 'This is a description';
|
||||
$localobject->note = 'This is note';
|
||||
$localobject->note_private = 'This is note';
|
||||
$localobject->fk_project = 0;
|
||||
$localobject->datep = $now;
|
||||
$localobject->datef = $now;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user