Skip to content

Commit

Permalink
Debug skill module
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 25, 2023
1 parent d3d0799 commit 226c63c
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions htdocs/hrm/position.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'jobpositionlist'; // To manage different context of search
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$id = GETPOST('id', 'int');
$fk_job = GETPOST('fk_job', 'int');
$backtopage = GETPOST('backtopage', 'alpha');
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');

$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$fk_job = GETPOST('fk_job', 'int');
$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'));


// Load variable for pagination
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
Expand All @@ -65,18 +73,6 @@
$pageprev = $page - 1;
$pagenext = $page + 1;

// Get parameters
$id = GETPOST('fk_job', 'int');
$ref = GETPOST('ref', 'alpha');
$fk_job = GETPOST('fk_job', 'int');
$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'));

$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
$backtopage = GETPOST('backtopage', 'alpha');
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
$fk_job = GETPOST('fk_job', 'int');

// Initialize technical objects
$object = new Job($db);
Expand Down Expand Up @@ -183,9 +179,9 @@
$backurlforlist = dol_buildpath('/hrm/position_list.php', 1);
//$backtopage = dol_buildpath('/hrm/position.php', 1) . '?fk_job=' . ($fk_job > 0 ? $fk_job : '__ID__');

if (empty($backtopage) || ($cancel && $fk_job <= 0)) {
if (empty($backtopage) || ($cancel && empty($id))) {
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
if ($fk_job == -1 && (($action != 'add' && $action != 'create') || $cancel)) {
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
$backtopage = $backurlforlist;
} else {
if ($fk_job > 0) {
Expand Down

0 comments on commit 226c63c

Please sign in to comment.