diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index ae30c900338..b76d291cad1 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -26,8 +26,8 @@ */ // Put here all includes required by your class file -require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -dol_include_once('hrm/class/evaluationdet.class.php'); +require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluationdet.class.php'; //require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; //require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; @@ -226,7 +226,7 @@ class Evaluation extends CommonObject $resultcreate = $this->createCommon($user, $notrigger); if ($resultcreate > 0) { - dol_include_once('hrm/class/skillrank.class.php'); + require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php'; $skillRank = new SkillRank($this->db); $TRequiredRanks = $skillRank->fetchAll('ASC', 't.rowid', 0, 0, array('customsql' => 'fk_object='.$this->fk_job.' AND objecttype="job"')); @@ -662,7 +662,7 @@ class Evaluation extends CommonObject public function getLastEvaluationForUser($fk_user) { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."hrm_evaluation "; - $sql.= "WHERE fk_user=".$fk_user." "; + $sql.= "WHERE fk_user=".((int)$fk_user)." "; $sql.= "ORDER BY date_eval DESC "; $sql.= "LIMIT 1 "; diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index 0c591a3a374..aaea72b645e 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -27,7 +27,7 @@ // Put here all includes required by your class file require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -dol_include_once('hrm/class/skillrank.class.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php'; //require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; //require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index e6f63bb7d68..b6242527178 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -27,7 +27,7 @@ // Put here all includes required by your class file require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; -dol_include_once('hrm/lib/hrm_skillrank.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skillrank.lib.php'; /** * Class for SkillRank diff --git a/htdocs/hrm/compare.php b/htdocs/hrm/compare.php index f47eec79997..af41e1bdca1 100644 --- a/htdocs/hrm/compare.php +++ b/htdocs/hrm/compare.php @@ -39,11 +39,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; ini_set('display_errors', 1); -dol_include_once('/hrm/class/skill.class.php'); -dol_include_once('/hrm/class/job.class.php'); -dol_include_once('/hrm/class/evaluation.class.php'); -dol_include_once('/hrm/class/position.class.php'); -dol_include_once('/hrm/lib/hrm.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/evaluation.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm.lib.php'; $permissiontoread = $user->rights->hrm->compare->read; if (empty($conf->hrm->enabled)) accessforbidden(); diff --git a/htdocs/hrm/evaluation_contact.php b/htdocs/hrm/evaluation_contact.php index db6d93f7ef7..540154b77ef 100644 --- a/htdocs/hrm/evaluation_contact.php +++ b/htdocs/hrm/evaluation_contact.php @@ -58,8 +58,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -dol_include_once('/hrm/class/evaluation.class.php'); -dol_include_once('/hrm/lib/hrm_evaluation.lib.php'); +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")); diff --git a/htdocs/hrm/job_agenda.php b/htdocs/hrm/job_agenda.php index b6fbd6aee82..77dd464a7f0 100644 --- a/htdocs/hrm/job_agenda.php +++ b/htdocs/hrm/job_agenda.php @@ -80,8 +80,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -dol_include_once('/hrm/class/job.class.php'); -dol_include_once('/hrm/lib/hrm_job.lib.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 diff --git a/htdocs/hrm/job_card.php b/htdocs/hrm/job_card.php index 728c288d6cc..19b40048f7b 100644 --- a/htdocs/hrm/job_card.php +++ b/htdocs/hrm/job_card.php @@ -84,8 +84,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; -dol_include_once('/hrm/class/job.class.php'); -dol_include_once('/hrm/lib/hrm_job.lib.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", "other", 'products')); diff --git a/htdocs/hrm/job_contact.php b/htdocs/hrm/job_contact.php index 471f5c63886..cbc961d3f9e 100644 --- a/htdocs/hrm/job_contact.php +++ b/htdocs/hrm/job_contact.php @@ -58,8 +58,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -dol_include_once('/hrm/class/job.class.php'); -dol_include_once('/hrm/lib/hrm_job.lib.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")); diff --git a/htdocs/hrm/job_document.php b/htdocs/hrm/job_document.php index c8cd764b9de..a32f02915e9 100644 --- a/htdocs/hrm/job_document.php +++ b/htdocs/hrm/job_document.php @@ -81,8 +81,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -dol_include_once('/hrm/class/job.class.php'); -dol_include_once('/hrm/lib/hrm_job.lib.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")); diff --git a/htdocs/hrm/job_note.php b/htdocs/hrm/job_note.php index 3f63e50b9a6..85a1cd1dc84 100644 --- a/htdocs/hrm/job_note.php +++ b/htdocs/hrm/job_note.php @@ -77,8 +77,8 @@ if (!$res) { die("Include of main fails"); } -dol_include_once('/hrm/class/job.class.php'); -dol_include_once('/hrm/lib/hrm_job.lib.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")); diff --git a/htdocs/hrm/position.php b/htdocs/hrm/position.php index 7fc5cc777b6..0fcc817c8c9 100644 --- a/htdocs/hrm/position.php +++ b/htdocs/hrm/position.php @@ -84,10 +84,10 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; -dol_include_once('/hrm/class/position.class.php'); -dol_include_once('/hrm/class/job.class.php'); -dol_include_once('/hrm/lib/hrm_position.lib.php'); -dol_include_once('/hrm/lib/hrm_job.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/hrm/position_contact.php b/htdocs/hrm/position_contact.php index 76ec4f0b349..56a4fc8ff8f 100644 --- a/htdocs/hrm/position_contact.php +++ b/htdocs/hrm/position_contact.php @@ -58,8 +58,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -dol_include_once('/hrm/class/position.class.php'); -dol_include_once('/hrm/lib/hrm_position.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/position.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_position.lib.php'; // Load translation files required by the page $langs->loadLangs(array("hrm", "companies", "other", "mails")); diff --git a/htdocs/hrm/skill_agenda.php b/htdocs/hrm/skill_agenda.php index 7fbcfe78369..0b854ccb028 100644 --- a/htdocs/hrm/skill_agenda.php +++ b/htdocs/hrm/skill_agenda.php @@ -80,8 +80,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -dol_include_once('/hrm/class/skill.class.php'); -dol_include_once('/hrm/lib/hrm_skill.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index e3dbf63e160..7d45ab152a0 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -84,8 +84,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; -dol_include_once('/hrm/class/skill.class.php'); -dol_include_once('/hrm/lib/hrm_skill.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page diff --git a/htdocs/hrm/skill_contact.php b/htdocs/hrm/skill_contact.php index 11ff55e8588..a535e00696b 100644 --- a/htdocs/hrm/skill_contact.php +++ b/htdocs/hrm/skill_contact.php @@ -58,8 +58,8 @@ if (!$res) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -dol_include_once('/hrm/class/skill.class.php'); -dol_include_once('/hrm/lib/hrm_skill.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page $langs->loadLangs(array("hrm", "companies", "other", "mails")); diff --git a/htdocs/hrm/skill_document.php b/htdocs/hrm/skill_document.php index 4e15c2acb9f..ca13044f712 100644 --- a/htdocs/hrm/skill_document.php +++ b/htdocs/hrm/skill_document.php @@ -81,8 +81,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -dol_include_once('/hrm/class/skill.class.php'); -dol_include_once('/hrm/lib/hrm_skill.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page $langs->loadLangs(array("hrm", "companies", "other", "mails")); diff --git a/htdocs/hrm/skill_note.php b/htdocs/hrm/skill_note.php index 564561e7c75..000c5e1b41b 100644 --- a/htdocs/hrm/skill_note.php +++ b/htdocs/hrm/skill_note.php @@ -77,8 +77,8 @@ if (!$res) { die("Include of main fails"); } -dol_include_once('/hrm/class/skill.class.php'); -dol_include_once('/hrm/lib/hrm_skill.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page $langs->loadLangs(array("hrm", "companies")); diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index 4694d27679a..4ecbc6439be 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -85,9 +85,9 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php'; -dol_include_once('/hrm/class/skill.class.php'); -dol_include_once('/hrm/class/skillrank.class.php'); -dol_include_once('/hrm/lib/hrm_skill.lib.php'); +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php'; +require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_skill.lib.php'; // Load translation files required by the page $langs->loadLangs(array("hrm", "other")); @@ -110,7 +110,7 @@ $skill = new SkillRank($db); // Initialize technical objects if (in_array($objecttype, $TAuthorizedObjects)) { if ($objecttype == 'job') { - dol_include_once('/hrm/class/job.class.php'); + require_once DOL_DOCUMENT_ROOT . '/hrm/class/job.class.php'; $object = new Job($db); } else if ($objecttype == "user") { $object = new User($db); @@ -217,7 +217,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // view configuration if ($objecttype == 'job') { - dol_include_once('/hrm/lib/hrm_job.lib.php'); + require_once DOL_DOCUMENT_ROOT . '/hrm/lib/hrm_job.lib.php'; $head = jobPrepareHead($object); $listLink = dol_buildpath('/hrm/job_list.php', 1); } else if ($objecttype == "user") {