diff --git a/htdocs/hrm/position.php b/htdocs/hrm/position.php index 2205753cefb..2dd1eb40782 100644 --- a/htdocs/hrm/position.php +++ b/htdocs/hrm/position.php @@ -54,7 +54,7 @@ $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$fk_job = GETPOST('fk_job', 'int'); +$fk_job = (GETPOSTISSET('fk_job') ? GETPOST('fk_job', 'int') : $id); $fk_user = GETPOST('fk_user', 'int'); //$start_date = date('Y-m-d', GETPOST('date_startyear', 'int').'-'.GETPOST('date_startmonth', 'int').'-'.GETPOST('date_startday', 'int')); $start_date = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index ab287ec115d..5394cac2334 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -678,7 +678,7 @@ if ($action != "create" && $action != "edit") { print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, (!empty($cssforfield) ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, (!empty($cssforfield) ? $cssforfield . ' ' : '')) . "\n"; } } - print ''; + //print ''; print ''; print '' . "\n"; diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index 83841b6258d..0ffd89181f2 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -263,7 +263,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // table of skillRank linked to current object - $TSkillsJob = $skill->fetchAll('ASC', 't.rowid', 0, 0, array('customsql' => 'fk_object=' . ((int) $id) . " AND objecttype='" . $db->escape($objecttype) . "'")); + $TSkillsJob = $skill->fetchAll('ASC', 't.rowid', 0, 0); $TAlreadyUsedSkill = array(); if (is_array($TSkillsJob) && !empty($TSkillsJob)) {