Merge pull request #22213 from dolibit-ut/patch-583

Update skill_card.php
This commit is contained in:
Laurent Destailleur 2022-09-13 15:22:59 +02:00 committed by GitHub
commit de4c978768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,9 +20,9 @@
*/ */
/** /**
* \file skill_card.php * \file htdocs/hrm/skill_card.php
* \ingroup hrm * \ingroup hrm
* \brief Page to create/edit/view skill * \brief Page to create/edit/view skills
*/ */
@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("hrm", "other", 'products')); $langs->loadLangs(array('hrm', 'other', 'products')); // why products?
// Get parameters // Get parameters
$id = GETPOST('id', 'int'); $id = GETPOST('id', 'int');
@ -77,9 +77,9 @@ if (empty($action) && empty($id) && empty($ref)) {
// Load object // Load object
include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
// Permissions
$permissiontoread = $user->rights->hrm->all->read; $permissiontoread = $user->rights->hrm->all->read;
$permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontoadd = $user->rights->hrm->all->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
$permissiontodelete = $user->rights->hrm->all->delete; $permissiontodelete = $user->rights->hrm->all->delete;
$upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/skill'; $upload_dir = $conf->hrm->multidir_output[isset($object->entity) ? $object->entity : 1] . '/skill';