diff --git a/synchro/synchro_exec.php b/synchro/synchro_exec.php index 8b5a07520..e65814898 100644 --- a/synchro/synchro_exec.php +++ b/synchro/synchro_exec.php @@ -90,7 +90,6 @@ 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 @@ -137,14 +136,14 @@ else { exit - 1; } - $sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas - - if ($sDataSourcesList == null) { - UsageAndExit($oP); - } } $bSimulate = (utils::ReadParam('simulate', '0', true) == '1'); +$sDataSourcesList = ReadMandatoryParam($oP, 'data_sources', 'raw_data'); // May contain commas + +if ($sDataSourcesList == null) { + UsageAndExit($oP); +} foreach(explode(',', $sDataSourcesList) as $iSDS) {