Update job_contact.php

This commit is contained in:
UT from dolibit 2022-09-11 10:59:44 +02:00 committed by GitHub
parent cc4bb9b40f
commit b084da4502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,22 +20,23 @@
*/
/**
* \file job_contact.php
* \ingroup hrm
* \brief Tab for contacts linked to Job
* \file htdocs/hrm/job_contact.php
* \ingroup hrm
* \brief Tab for contacts linked to Job
*/
// Load Dolibarr environment
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php';
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("hrm", "companies", "other", "mails"));
$langs->loadLangs(array('hrm', 'companies', 'other', 'mails'));
// Get Parameters
$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
$ref = GETPOST('ref', 'alpha');
$lineid = GETPOST('lineid', 'int');
@ -53,6 +54,7 @@ $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
// Permissions
$permission = $user->rights->hrm->job->write;
// Security check (enable the most restrictive one)