forked from Wavyzz/dolibarr
FIX #7533 Infinite loop in Agenda per user view if workinghours not set
correctly Remove the spaces in the Working_hours and Working_days stored
This commit is contained in:
@@ -109,6 +109,7 @@ if ($dateselect > 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS;
|
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS;
|
||||||
|
$tmp=str_replace(' ', '', $tmp); // FIX 7533
|
||||||
$tmparray=explode('-', $tmp);
|
$tmparray=explode('-', $tmp);
|
||||||
$begin_h = GETPOST('begin_h', 'int')!=''?GETPOST('begin_h', 'int'):($tmparray[0] != '' ? $tmparray[0] : 9);
|
$begin_h = GETPOST('begin_h', 'int')!=''?GETPOST('begin_h', 'int'):($tmparray[0] != '' ? $tmparray[0] : 9);
|
||||||
$end_h = GETPOST('end_h', 'int')?GETPOST('end_h', 'int'):($tmparray[1] != '' ? $tmparray[1] : 18);
|
$end_h = GETPOST('end_h', 'int')?GETPOST('end_h', 'int'):($tmparray[1] != '' ? $tmparray[1] : 18);
|
||||||
@@ -117,6 +118,7 @@ if ($end_h < 1 || $end_h > 24) $end_h = 18;
|
|||||||
if ($end_h <= $begin_h) $end_h = $begin_h + 1;
|
if ($end_h <= $begin_h) $end_h = $begin_h + 1;
|
||||||
|
|
||||||
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)?'1-5':$conf->global->MAIN_DEFAULT_WORKING_DAYS;
|
$tmp=empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)?'1-5':$conf->global->MAIN_DEFAULT_WORKING_DAYS;
|
||||||
|
$tmp=str_replace(' ', '', $tmp); // FIX 7533
|
||||||
$tmparray=explode('-', $tmp);
|
$tmparray=explode('-', $tmp);
|
||||||
$begin_d = GETPOST('begin_d', 'int')?GETPOST('begin_d', 'int'):($tmparray[0] != '' ? $tmparray[0] : 1);
|
$begin_d = GETPOST('begin_d', 'int')?GETPOST('begin_d', 'int'):($tmparray[0] != '' ? $tmparray[0] : 1);
|
||||||
$end_d = GETPOST('end_d', 'int')?GETPOST('end_d', 'int'):($tmparray[1] != '' ? $tmparray[1] : 5);
|
$end_d = GETPOST('end_d', 'int')?GETPOST('end_d', 'int'):($tmparray[1] != '' ? $tmparray[1] : 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user