diff --git a/synchro/synchro_exec.php b/synchro/synchro_exec.php index 276d4ad30..8b5a07520 100644 --- a/synchro/synchro_exec.php +++ b/synchro/synchro_exec.php @@ -90,6 +90,7 @@ if (utils::IsModeCLI()) { $sAuthUser = ReadMandatoryParam($oP, 'auth_user', 'raw_data'); $sAuthPwd = ReadMandatoryParam($oP, 'auth_pwd', 'raw_data'); + $sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas if (UserRights::CheckCredentials($sAuthUser, $sAuthPwd)) { UserRights::Login($sAuthUser); // Login & set the user's language @@ -136,7 +137,6 @@ else { exit - 1; } - $bSimulate = (utils::ReadParam('simulate', '0', true) == '1'); $sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas if ($sDataSourcesList == null) { @@ -144,6 +144,8 @@ else { } } +$bSimulate = (utils::ReadParam('simulate', '0', true) == '1'); + foreach(explode(',', $sDataSourcesList) as $iSDS) { $oSynchroDataSource = MetaModel::GetObject('SynchroDataSource', $iSDS, false);