Merge pull request #15428 from atm-quentin/FIX/actioncomm_desc_cant_be_empty

FIX cant empty action comm desc
This commit is contained in:
Laurent Destailleur 2020-11-18 12:47:37 +01:00 committed by GitHub
commit 823e399d8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -469,7 +469,6 @@ if (empty($reshook) && $action == 'update')
$object->note_private = trim(GETPOST("note", "none"));
$object->fk_element = GETPOST("fk_element", "int");
$object->elementtype = GETPOST("elementtype", "alphanohtml");
if (!$datef && $percentage == 100)
{
$error++; $donotclearsession = 1;

View File

@ -983,7 +983,7 @@ class ActionComm extends CommonObject
// Clean parameters
$this->label = trim($this->label);
$this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private));
$this->note_private = dol_htmlcleanlastbr(trim(!isset($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;