diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php index dc230dd38ff..d5eb05737f0 100644 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -1,4 +1,5 @@ * Copyright (C) 2020 Gauthier VERDOL * @@ -17,7 +18,7 @@ */ /** - * \file workstation_note.php + * \file htdocs/workstation/workstation_note.php * \ingroup workstation * \brief Tab for notes on Workstation */ @@ -29,12 +30,12 @@ require_once DOL_DOCUMENT_ROOT.'/workstation/class/workstation.class.php'; require_once DOL_DOCUMENT_ROOT.'/workstation/lib/workstation_workstation.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("workstation", "companies")); +$langs->loadLangs(array('workstation', 'companies')); // Get parameters -$id = GETPOST('id', 'int'); +$id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'aZ09'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -42,18 +43,19 @@ $backtopage = GETPOST('backtopage', 'alpha'); $object = new Workstation($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->workstation->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); // Load object -include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals if ($id > 0 || !empty($ref)) { $upload_dir = $conf->workstation->multidir_output[$object->entity]."/".$object->id; } -$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php -$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php +$permissionnote = $user->rights->workstation->workstation->write; // Used by the include of actions_setnotes.inc.php +$permissiontoadd = $user->rights->workstation->workstation->write; // Used by the include of actions_addupdatedelete.inc.php // Security check $isdraft = 0; @@ -63,7 +65,8 @@ restrictedArea($user, $object->element, $object->id, $object->table_element, 'wo /* * Actions */ -$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks + +$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); }