Update evaluation_contact.php
This commit is contained in:
parent
cc4bb9b40f
commit
8712b5eaea
@ -20,11 +20,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file evaluation_contact.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for contacts linked to Evaluation
|
||||
* \file htdocs/hrm/evaluation_contact.php
|
||||
* \ingroup hrm
|
||||
* \brief Tab for contacts linked to Evaluation
|
||||
*/
|
||||
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../main.inc.php';
|
||||
|
||||
@ -34,8 +35,9 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_evaluation.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 +55,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->evaluation->write;
|
||||
|
||||
// Security check (enable the most restrictive one)
|
||||
@ -64,10 +67,13 @@ $permission = $user->rights->hrm->evaluation->write;
|
||||
//if (!$permissiontoread) accessforbidden();
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Add a new contact
|
||||
* Action
|
||||
*/
|
||||
|
||||
// Add a new contact
|
||||
|
||||
if ($action == 'addcontact' && $permission) {
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user