Environments: banner displaying a message if env is NOT 'production' + factorized some code to create/update a config from the page parameters

SVN:trunk[1774]
This commit is contained in:
Romain Quetiez
2012-01-16 16:41:18 +00:00
parent 2931a0fd42
commit 8dc13026a0
7 changed files with 131 additions and 112 deletions

View File

@@ -211,7 +211,7 @@ try
'db_prefix' => utils::ReadParam('db_prefix', '', false, 'raw_data')
);
$sModuleDir = Utils::ReadParam('modules_dir', '');
UpdateConfigSettings($oConfig, $aParamValues, $sModuleDir);
$oConfig->UpdateFromParams($aParamValues, $sModuleDir);
InitDataModel($oConfig, true); // load data model only
@@ -240,7 +240,7 @@ try
'db_prefix' => utils::ReadParam('db_prefix', '', false, 'raw_data')
);
$sModuleDir = Utils::ReadParam('modules_dir', '');
UpdateConfigSettings($oConfig, $aParamValues, $sModuleDir);
$oConfig->UpdateFromParams($aParamValues, $sModuleDir);
InitDataModel($oConfig, false); // load data model and connect to the database
@@ -310,7 +310,7 @@ try
'db_prefix' => utils::ReadParam('db_prefix', '', false, 'raw_data')
);
$sModuleDir = Utils::ReadParam('modules_dir', '');
UpdateConfigSettings($oConfig, $aParamValues, $sModuleDir);
$oConfig->UpdateFromParams($aParamValues, $sModuleDir);
InitDataModel($oConfig, false); // load data model and connect to the database