From 2f07d48894934c79bdf1ae7984082ef616411782 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Sun, 11 Sep 2022 11:25:22 +0200 Subject: [PATCH] Update position_note.php --- htdocs/hrm/position_note.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/hrm/position_note.php b/htdocs/hrm/position_note.php index 99d6581247f..1ecd77b4bdc 100644 --- a/htdocs/hrm/position_note.php +++ b/htdocs/hrm/position_note.php @@ -20,26 +20,27 @@ */ /** - * \file position_note.php - * \ingroup hrm - * \ingroup hrm - * \brief Tab for notes on Position + * \file htdocs/hrm/position_note.php + * \ingroup hrm + * \brief Tab for notes on Position */ // Load Dolibarr environment require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';; require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; -require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';; + // Load translation files required by the page -$langs->loadLangs(array("hrm", "companies")); +$langs->loadLangs(array('hrm', 'companies')); + // Get parameters -$id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -58,7 +59,8 @@ if ($id > 0 || !empty($ref)) { $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; } -$permissionnote = $user->rights->hrm->all->write; +// Permissions +$permissionnote = $user->rights->hrm->all->write; $permissiontoread = $user->rights->hrm->all->read; // Used by the include of actions_addupdatedelete.inc.php // Security check (enable the most restrictive one)