From e53cab0d1d4892cabbedde88b088b2e373656907 Mon Sep 17 00:00:00 2001 From: Pierre Goiffon Date: Fri, 2 Apr 2021 08:22:03 +0200 Subject: [PATCH] :art: fix param order for \CMDBSource::IsSameFieldTypes call + code formatting --- synchro/synchrodatasource.class.inc.php | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/synchro/synchrodatasource.class.inc.php b/synchro/synchrodatasource.class.inc.php index 817d4bd9c..4d4b2b143 100644 --- a/synchro/synchrodatasource.class.inc.php +++ b/synchro/synchrodatasource.class.inc.php @@ -1109,29 +1109,21 @@ EOF $bOneColIsMissing = true; if ($bVerbose) { - if (count($aColumns) > 1) - { + if (count($aColumns) > 1) { echo "Missing column '$sColName', in the table '$sTable' for the data synchro task ".$this->GetName().' ('.$this->GetKey()."). The columns '".implode("', '", $aColumns)." will be re-created.'.\n"; - } - else - { + } else { echo "Missing column '$sColName', in the table '$sTable' for the data synchro task ".$this->GetName().' ('.$this->GetKey()."). The column '$sColName' will be added.\n"; } } - } - elseif (!CMDBSource::IsSameFieldTypes(CMDBSource::GetFieldSpec($sTable, $sColName), $sColumnDef)) - { + } elseif (!CMDBSource::IsSameFieldTypes($sColumnDef, CMDBSource::GetFieldSpec($sTable, $sColName))) { $bFixNeeded = true; $bOneColIsMissing = true; - if (count($aColumns) > 1) - { + if (count($aColumns) > 1) { echo "Incorrect column '$sColName' (".CMDBSource::GetFieldType($sTable, $sColName).' instead of '.$sColumnDef."), in the table '$sTable' for the data synchro task ".$this->GetName().' ('.$this->GetKey()."). The columns '".implode("', '", $aColumns)." will be re-created.'.\n"; - } - else - { + } else { echo "Incorrect column '$sColName' (".CMDBSource::GetFieldType($sTable, $sColName).' instead of '.$sColumnDef."), in the table '$sTable' for the data synchro task ".$this->GetName().' ('.$this->GetKey()."). The column '$sColName' will be added.\n"; }