[minor] formatting issues

This commit is contained in:
atm-florian 2022-06-15 08:46:54 +02:00
parent b4e068dcdc
commit d4b19ed8a3

View File

@ -11117,7 +11117,7 @@ function dolForgeCriteriaCallback($matches)
* *
* @param string $prefix Prefix used to build the date selector (for instance using Form::selectDate) * @param string $prefix Prefix used to build the date selector (for instance using Form::selectDate)
* @param string $hourTime 'getpost' to include hour, minute, second values from the HTTP request, 'XX:YY:ZZ' to set * @param string $hourTime 'getpost' to include hour, minute, second values from the HTTP request, 'XX:YY:ZZ' to set
* hour, minute, second respectively (for instance '23:59:59') * hour, minute, second respectively (for instance '23:59:59')
* @param string $gm Passed to dol_mktime * @param string $gm Passed to dol_mktime
* @return int|string Date as a timestamp, '' or false if error * @return int|string Date as a timestamp, '' or false if error
*/ */
@ -11128,9 +11128,9 @@ function GETPOSTDATE($prefix, $hourTime = '', $gm = 'auto')
$minute = GETPOSTINT($prefix . 'minute'); $minute = GETPOSTINT($prefix . 'minute');
$second = GETPOSTINT($prefix . 'second'); $second = GETPOSTINT($prefix . 'second');
} elseif (preg_match('/^(\d\d):(\d\d):(\d\d)$/', $hourTime, $m)) { } elseif (preg_match('/^(\d\d):(\d\d):(\d\d)$/', $hourTime, $m)) {
$hour = (int)$m[1]; $hour = intval($m[1]);
$minute = (int)$m[2]; $minute = intval($m[2]);
$second = (int)$m[3]; $second = intval($m[3]);
} else { } else {
$hour = $minute = $second = 0; $hour = $minute = $second = 0;
} }