Clean code

This commit is contained in:
Laurent Destailleur 2024-01-04 03:44:14 +01:00
parent a2b27aaf4e
commit e9e9bd2e09

View File

@ -51,15 +51,15 @@ class Status extends DolibarrApi
'success' => array(
'code' => 200,
'dolibarr_version' => DOL_VERSION,
'access_locked' => (!getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED') ? '0' : getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED')),
'access_locked' => getDolGlobalString('MAIN_ONLY_LOGIN_ALLOWED', '0'),
),
);
if ( $dolibarr_main_prod == '0' ) {
if (empty($dolibarr_main_prod)) {
$response['success']['environment'] = 'non-production';
$response['success']['timestamp_now_utc'] = dol_now();
$response['success']['timestamp_php_tz'] = date_default_timezone_get();
$response['success']['date_tz'] = dol_print_date(dol_now('gmt'), '%d-%m-%Y %H:%M:%S');
$response['success']['date_tz'] = dol_print_date(dol_now('gmt'), 'standard');
}
return $response;