N°6474 - Fix undefined variable due to failed merge + refactoring

This commit is contained in:
Stephen Abello
2023-06-27 16:54:50 +02:00
parent 011116029b
commit 29a90fe244

View File

@@ -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);