diff --git a/datamodels/2.x/combodo-data-feature-removal/src/Service/DataFeatureRemoverExtensionService.php b/datamodels/2.x/combodo-data-feature-removal/src/Service/DataFeatureRemoverExtensionService.php
index df77c6bba..5dcdaa416 100644
--- a/datamodels/2.x/combodo-data-feature-removal/src/Service/DataFeatureRemoverExtensionService.php
+++ b/datamodels/2.x/combodo-data-feature-removal/src/Service/DataFeatureRemoverExtensionService.php
@@ -15,7 +15,6 @@ class DataFeatureRemoverExtensionService
{
private static DataFeatureRemoverExtensionService $oInstance;
- private array $aSelectedExtensions = [];
private array $aItopExtensions = [];
private array $aIncludingExtensionsByModuleName = [];
@@ -46,7 +45,7 @@ class DataFeatureRemoverExtensionService
public function GetIncludingExtensions(string $sModuleName): array
{
if (count($this->aIncludingExtensionsByModuleName) === 0) {
- foreach ($this->ReadiTopExtensions() as $oExtension) {
+ foreach ($this->ReadItopExtensions() as $oExtension) {
$aModuleNames = $oExtension->aModules;
if (is_array($aModuleNames) && count($aModuleNames) > 0) {
foreach ($aModuleNames as $sModule) {
diff --git a/datamodels/2.x/combodo-data-feature-removal/src/Service/DeletionPlanService.php b/datamodels/2.x/combodo-data-feature-removal/src/Service/DeletionPlanService.php
index 287e70da0..9f609bf3c 100644
--- a/datamodels/2.x/combodo-data-feature-removal/src/Service/DeletionPlanService.php
+++ b/datamodels/2.x/combodo-data-feature-removal/src/Service/DeletionPlanService.php
@@ -110,10 +110,10 @@ class DeletionPlanService
$oToUpdate = $aData['to_reset'];
/** @var \DBObject $oToUpdate */
foreach ($aData['attributes'] as $sRemoteExtKey => $aRemoteAttDef) {
- $oToUpdate->Set($sRemoteExtKey, 0);
- $oToUpdate->DBUpdate();
- $oDeletionPlanSummaryEntity->iUpdateCount++;
+ $oToUpdate->Set($sRemoteExtKey, $aData['values'][$sRemoteExtKey]);
}
+ $oToUpdate->DBUpdate();
+ $oDeletionPlanSummaryEntity->iUpdateCount++;
}
$aSummary[$sClass] = $oDeletionPlanSummaryEntity;
@@ -130,7 +130,7 @@ class DeletionPlanService
MetaModel::PurgeData($oFilter);
// Delete the entry
- $aClassesToRemove = array_merge(MetaModel::EnumChildClasses($sClass, ENUM_PARENT_CLASSES_ALL), MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_EXCLUDELEAF, false));
+ $aClassesToRemove = array_merge(MetaModel::EnumChildClasses($sClass, ENUM_CHILD_CLASSES_ALL), MetaModel::EnumParentClasses($sClass, ENUM_PARENT_CLASSES_EXCLUDELEAF, false));
foreach ($aClassesToRemove as $sParentClass) {
$oFilter = DBObjectSearch::FromOQL_AllData("SELECT $sParentClass WHERE id=:id");
$sQuery = $oFilter->MakeDeleteQuery(['id' => $sId]);
diff --git a/datamodels/2.x/combodo-data-feature-removal/templates/DeletionPlan.html.twig b/datamodels/2.x/combodo-data-feature-removal/templates/DeletionPlan.html.twig
index 37dfe3bbb..d4edc84fc 100644
--- a/datamodels/2.x/combodo-data-feature-removal/templates/DeletionPlan.html.twig
+++ b/datamodels/2.x/combodo-data-feature-removal/templates/DeletionPlan.html.twig
@@ -20,6 +20,6 @@
{% UIInput ForHidden { sName:'transaction_id', sValue:sTransactionId} %}
{% UIInput ForHidden { sName:'operation', sValue:'Main'} %}
{% UIToolbar ForButton {} %}
- {% UIButton ForPrimaryAction {sLabel:'UI:Button:BackToMain'|dict_s, sName:'btn_deletion', sId:'btn_deletion', bIsSubmit:true} %}
+ {% UIButton ForPrimaryAction {sLabel:'UI:Button:BackToMain'|dict_s, sName:'btn_back', sId:'btn_back', bIsSubmit:true} %}
{% EndUIToolbar %}
{% EndUIForm %}
\ No newline at end of file
diff --git a/setup/wizardsteps/WizStepDataAudit.php b/setup/wizardsteps/WizStepDataAudit.php
index e56fabb5d..95e312400 100644
--- a/setup/wizardsteps/WizStepDataAudit.php
+++ b/setup/wizardsteps/WizStepDataAudit.php
@@ -102,10 +102,14 @@ JS);
$aRemovedExtensions = json_decode($this->oWizard->GetParameter('removed_extensions', "[]"), true);
$aHiddenRemovedExtensionInputs = "";
- $i = 0;
+ if (!is_array($aRemovedExtensions)) {
+ IssueLog::Warning('Posted removed_extensions is not an array');
+ $aRemovedExtensions = [];
+ }
foreach ($aRemovedExtensions as $sExtCode => $sExtLabel) {
+ $sSafeExtCode = utils::HtmlEntities($sExtCode);
$aHiddenRemovedExtensionInputs .= <<
+
INPUT;
}