File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,30 @@ public function Display(WebPage $oPage)
8383 $ oPage ->add ('<input type="hidden" id="authent_token" value=" ' .$ sAuthentToken .'"/> ' );
8484 if (!$ this ->CheckDependencies ()) {
8585 $ oPage ->error ($ this ->sDependencyIssue );
86+ $ oPage ->add_ready_script (<<<JS
87+ $("#wiz_form").data("installation_status", "error");
88+ document.getElementById("setup_msg").innerText = "Unmet dependencies";
89+ JS );
90+ return ;
8691 }
8792
88- $ oPage ->add_ready_script (
89- <<<JS
93+ $ aExtensionsRemoved = json_decode ($ this ->oWizard ->GetParameter ('removed_extensions ' ), true ) ?? [];
94+ $ aExtensionsNotUninstallable = json_decode ($ this ->oWizard ->GetParameter ('extensions_not_uninstallable ' ));
95+ $ aExtensionsForceUninstalled = [];
96+ foreach ($ aExtensionsRemoved as $ sExtensionCode => $ sLabel ) {
97+ if (in_array ($ sExtensionCode , $ aExtensionsNotUninstallable )) {
98+ $ aExtensionsForceUninstalled [] = $ sExtensionCode ;
99+ }
100+ }
101+ if (count ($ aExtensionsForceUninstalled )) {
102+ SetupLog::Info ("Extensions uninstalled forcefully : " .implode (', ' , $ aExtensionsForceUninstalled ));
103+ }
104+
105+ $ oPage ->add_ready_script (<<<JS
90106 $("#wiz_form").data("installation_status", "not started");
91107 ExecuteStep("");
92- JS
93- );
108+ JS );
109+
94110 }
95111
96112 /**
You can’t perform that action at this time.
0 commit comments