Agregar formatos de fecha y nombres al endpoint que obtiene los parámetros del sistema

tomar en ceunta cuando es environment es numerico o algun campo inexistente

fix in default values in environment
This commit is contained in:
Ronald Quenta
2015-09-25 09:02:04 -04:00
parent e93d5edbce
commit 3caf4e9b1a

View File

@@ -1244,6 +1244,16 @@ class Light
$fields = \System::getSysInfo();
$response['version'] = $fields['PM_VERSION'];
$conf = new \Configurations();
$confEnvironment = $conf->getFormats();
$response['environment'] = array();
if (is_array($confEnvironment)){
$response['environment']['format'] = isset($confEnvironment['format'])?$confEnvironment['format']:'';
$response['environment']['dateFormat'] = isset($confEnvironment['dateFormat'])?$confEnvironment['dateFormat']:'';
$response['environment']['casesListDateFormat'] = isset($confEnvironment['casesListDateFormat'])?$confEnvironment['casesListDateFormat']:'';
}
$Translations = new \Translation;
$translationsTable = $Translations->getTranslationEnvironments();
$languagesList = array ();