diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 248e367b998..263f685dc78 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -602,7 +602,7 @@ class Job extends CommonObject /** * Get last job for user * - * @param $fk_user + * @param int $fk_user id of user we need to get last job * @return mixed|string|null */ public function getLastJobForUser($fk_user) @@ -610,7 +610,7 @@ class Job extends CommonObject global $db; $j = new Job($db); - $Tab = $j->get_for_user($fk_user); + $Tab = $j->getForUser($fk_user); if (empty($Tab)) return ''; @@ -622,16 +622,16 @@ class Job extends CommonObject /** * Get jobs for user * - * @param $userid + * @param int $userid id of user we need to get job list * @return array of jobs */ - public function get_for_user($userid) + public function getForUser($userid) { global $db; $TReturn = array(); $position = new Position($db); - $TPosition = $position->get_for_user($userid); + $TPosition = $position->getForUser($userid); foreach ($TPosition as $UPosition) { $TReturn[$UPosition->Job->rowid] = $UPosition->Job->ref; } diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index 9b9241477c9..e15a15de12d 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -981,10 +981,10 @@ class Position extends CommonObject } /** - * @param $userid + * @param int $userid id of user we need to get position list * @return array|int of positions of user with for each of them the job fetched into that array */ - public function get_for_user($userid) + public function getForUser($userid) { $TPosition = array(); diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 0a1158593b2..7cf2d60e88a 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -240,6 +240,10 @@ class Skill extends CommonObject return $resultcreate; } + /** + * @param int $i rank from which we want to create skilldets + * @return null + */ public function createSkills($i = 1) { @@ -1086,40 +1090,45 @@ class Skill extends CommonObject return $error; } + /** * Permet de retourner un select html du dictionnaire llx_c_skill_type * - * @global type $conf - * @param string $selected - * @param string $htmlname - * @param bool $emptyvalue + * @param string $selected preselected element + * @param string $htmlname html name of input + * @param bool $emptyvalue true if we need to put an empty value + * @param string $moreattr used to add more html attributes into input + * @param string $more_class used if we want to add new css class to input * @return string */ - public function select_skill_type($selected = '', $htmlname = 'code_c_skill_type', $emptyvalue = true, $moreattr = '', $more_class = '') - { - global $conf; - - $out = ''; - - return $out; - } - +// public function select_skill_type($selected = '', $htmlname = 'code_c_skill_type', $emptyvalue = true, $moreattr = '', $more_class = '') +// { +// global $conf; +// +// $out = ''; +// +// return $out; +// } + /** + * @param int $code number of code label + * @return int|string + */ public static function typeCodeToLabel($code) { global $langs; diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 5e1149f133e..ffd83008589 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -362,10 +362,10 @@ class SkillRank extends CommonObject * The skillrank table is a join table that is marked for multiple objects * * @param SkillRank $currentSkill - * @param $user - * @return int + * @param int $fk_user id of user linked to skillrank + * @return int > 0 if ok, < 0 if ko */ - public function cloneFromCurrentSkill($currentSkill, $user, $fk_user) + public function cloneFromCurrentSkill($currentSkill, $fk_user) { global $user; diff --git a/htdocs/hrm/evaluation_card.php b/htdocs/hrm/evaluation_card.php index 48554770107..4ae21fef372 100644 --- a/htdocs/hrm/evaluation_card.php +++ b/htdocs/hrm/evaluation_card.php @@ -223,7 +223,7 @@ if (empty($reshook)) { if (count($SkillrecordsForActiveUser) == 0) { if ($res > 0) { $newSkill = new SkillRank($db); - $resCreate = $newSkill->cloneFromCurrentSkill($line, $user, $object->fk_user); + $resCreate = $newSkill->cloneFromCurrentSkill($line, $object->fk_user); if ($resCreate <= 0) { $errors++; @@ -251,7 +251,7 @@ if (empty($reshook)) { $updSkill->update($user); } else { // sinon on ajoute la skill $newSkill = new SkillRank($db); - $resCreate = $newSkill->cloneFromCurrentSkill($line, $user, $object->fk_user); + $resCreate = $newSkill->cloneFromCurrentSkill($line, $object->fk_user); } } } diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index d577605c6fb..12602a46c0a 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -339,7 +339,7 @@ if (($id || $ref) && $action == 'edit') { // if (!empty($val['help'])) { // print $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help'])); // } else { - print $langs->trans($val['label']).' '.$langs->trans('Rank').' '.$sk->rank; + print $langs->trans($val['label']).' '.$langs->trans('rank').' '.$sk->rank; // } print ''; print '