Skip to content
Snippets Groups Projects
Commit ee911fcd authored by tmortagne's avatar tmortagne
Browse files

XWIKI-8632: Distribution Wizard propose a downgrade after importing the default XAR

parent 54d40891
No related branches found
No related tags found
No related merge requests found
......@@ -73,8 +73,15 @@ protected AbstractJobStatus<DistributionRequest> createNewStatus(DistributionReq
DistributionStepStatus step1 = new DistributionStepStatus("extension.mainui");
steps.add(step1);
// Only if the UI is not already installed
if (extensionUI == null || this.installedRepository.getInstalledExtension(extensionUI) != null) {
step1.setUpdateState(UpdateState.COMPLETED);
step1.setUpdateState(UpdateState.COMPLETED);
if (extensionUI != null) {
// FIXME: using "xwiki" directly is cheating but there is no way to get the official main wiki at this
// level yet. Using "xwiki" since in pratice there is no way to change the main wiki
InstalledExtension installedExtension =
this.installedRepository.getInstalledExtension(extensionUI.getId(), "wiki:xwiki");
if (installedExtension != null && !installedExtension.getId().getVersion().equals(extensionUI.getVersion())) {
step1.setUpdateState(null);
}
}
// Step 2: Upgrade outdated extensions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment