Files
luos/workflow/engine/methods/setup/environmentSettingsAjax.php
Marco Antonio Nina 37f90b18bf BUG-8665 32K Issue - Maximum of folder in shared/sites/files IMPROVEMENT
- No se modificaba la estructura porque no se tenia seteado la variable ENVIRONMENT_SETTINGS.
- Se modifico la funcion upgradeCasesDirectoryStructure para que cree la variable si no existe.
- Se movio la funcion upgradeCasesDirectoryStructure para que sea independiente al realizar el upgrade.
- se creo la funcion update-structure-directories para ejecutar por consola teniendo como parametro el workspace.
2013-06-26 09:06:35 -04:00

58 lines
1.8 KiB
PHP
Executable File

<?php
/**
*
* @author Erik A.O. <erik@colosa.com>
* @date Sept 13th, 2010
*
*/
G::LoadClass( "configuration" );
$request = isset( $_POST["request"] ) ? $_POST["request"] : (isset( $_GET["request"] ) ? $_GET["request"] : null);
$result = new stdclass();
switch ($request) {
case "getUserMaskList":
$result->rows = Configurations::getUserNameFormats();
print (G::json_encode( $result )) ;
break;
case "getDateFormats":
$result->rows = Configurations::getDateFormats();
print (G::json_encode( $result )) ;
break;
case "getCasesListDateFormat":
$result->rows = Configurations::getDateFormats();
;
print (G::json_encode( $result )) ;
break;
case "getCasesListRowNumber":
for ($i = 10; $i <= 50; $i += 5) {
$formats[] = array ("id" => "$i","name" => "$i"
);
}
$result->rows = $formats;
print (G::json_encode( $result )) ;
break;
case "save":
$conf = new Configurations();
$config = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "" );
$config['format'] = $_POST["userFormat"];
$config['dateFormat'] = $_POST["dateFormat"];
$config['startCaseHideProcessInf'] = ((isset( $_POST["hideProcessInf"] )) ? true : false);
$config['casesListDateFormat'] = $_POST["casesListDateFormat"];
$config['casesListRowNumber'] = intval( $_POST["casesListRowNumber"] );
$config['casesListRefreshTime'] = intval( $_POST["txtCasesRefreshTime"]);
$conf->aConfig = $config;
$conf->saveConfig( "ENVIRONMENT_SETTINGS", "" );
$response = new stdclass();
$response->success = true;
$response->msg = G::LoadTranslation( "ID_SAVED_SUCCESSFULLY" );
echo G::json_encode( $response );
break;
}