From 3939a640e91ce225455c7a7673016e180512aa20 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 6 Jul 2020 16:52:28 +0200 Subject: [PATCH] Fix note in creation --- htdocs/comm/action/card.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index d733cb61ba3..9643826b4e7 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -111,6 +111,7 @@ $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + /* * Actions */ @@ -317,7 +318,7 @@ if (empty($reshook) && $action == 'add') if (GETPOST("doneby") > 0) $object->userdoneid = GETPOST("doneby", "int"); } - $object->note_private = trim(GETPOST("note")); + $object->note_private = trim(GETPOST("note", "none")); if (isset($_POST["contactid"])) $object->contact = $contact; @@ -465,7 +466,7 @@ if (empty($reshook) && $action == 'update') $object->contactid = key($object->socpeopleassigned); } $object->fk_project = GETPOST("projectid", 'int'); - $object->note_private = GETPOST("note", "none"); + $object->note_private = trim(GETPOST("note", "none")); $object->fk_element = GETPOST("fk_element", "int"); $object->elementtype = GETPOST("elementtype", "alphanohtml"); @@ -1118,7 +1119,7 @@ if ($action == 'create') // Description print ''.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('note', (GETPOST('note', 'none') ?GETPOST('note', 'none') : $object->note_private), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); + $doleditor = new DolEditor('note', (GETPOST('note', 'none') ? GETPOST('note', 'none') : $object->note_private), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); $doleditor->Create(); print '';