-
Notifications
You must be signed in to change notification settings - Fork 278
N°8864 list extensions installation in setup recap #790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/uninstallation
Are you sure you want to change the base?
N°8864 list extensions installation in setup recap #790
Conversation
| $aExtensionsAdded = []; | ||
| $aExtensionsRemoved = []; | ||
| $aExtensionsNotUninstallable = []; | ||
| foreach ($this->oExtensionsMap->GetAllExtensionsWithPreviouslyInstalled() as $oExtension) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you extract all changes in a separate function? and cover it with tests?
| $this->oWizard->SetParameter('old_addon', true); | ||
| } | ||
|
|
||
| $aExtensionsAdded = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 2 arrays could contain html lines instead of extension codes. afterwhile you could use implode. code would be simpler.
| } elseif (!$oExtension->bInstalled && $bSelected) { | ||
| $aExtensionsAdded[$oExtension->sCode] = $oExtension->sLabel; | ||
| } | ||
| if (!$oExtension->CanBeUninstalled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to add uninstallable extensions when added. please move this 3 lines above.
| } | ||
| } | ||
|
|
||
| $sExtensionsAdded = '<ul><li>No extension added.</li></ul>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this variable is initialized with a useless value when below array count >0.
| $sExtensionsAdded .= '</ul>'; | ||
| } | ||
|
|
||
| $sExtensionsRemoved = '<ul><li>No extension removed.</li></ul>'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same remark. this variable is initialized with a useless value when below array count >0.
No description provided.