[Qual] Uniformize code

This commit is contained in:
philippe grand
2015-11-19 13:59:58 +01:00
parent 3094f9ed32
commit 4f280f63d0
11 changed files with 61 additions and 61 deletions

View File

@@ -33,7 +33,7 @@ if ($action == 'setnote_public' && ! empty($permissionnote) && ! GETPOST('cancel
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before');
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES),'_public');
if ($result < 0) setEventMessage($object->error,'errors');
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}
// Set public note
else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('cancel'))
@@ -41,5 +41,5 @@ else if ($action == 'setnote_private' && ! empty($permissionnote) && ! GETPOST('
if (empty($action) || ! is_object($object) || empty($id)) dol_print_error('','Include of actions_setnotes.inc.php was done but required variable was not set before');
if (empty($object->id)) $object->fetch($id); // Fetch may not be already done
$result=$object->update_note(dol_html_entity_decode(GETPOST('note_private'), ENT_QUOTES),'_private');
if ($result < 0) setEventMessage($object->error,'errors');
if ($result < 0) setEventMessages($object->error, $object->errors, 'errors');
}