Skip to content

Commit

Permalink
fix #2752 upgrade task for 14.9
Browse files Browse the repository at this point in the history
  • Loading branch information
marevol committed Jun 22, 2023
1 parent 26d5f0e commit 5c1e681
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public class AdminUpgradeAction extends FessAdminAction {

private static final String VERSION_14_7 = "14.7";

private static final String VERSION_14_8 = "14.8";

// ===================================================================================
// Attribute
//
Expand Down Expand Up @@ -189,6 +191,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -225,6 +228,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -260,6 +264,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -294,6 +299,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -327,6 +333,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -359,6 +366,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -390,6 +398,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -420,6 +429,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -449,6 +459,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -477,6 +488,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand Down Expand Up @@ -504,6 +516,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -529,6 +542,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -553,6 +567,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -576,6 +591,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -598,6 +614,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -620,6 +637,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -641,6 +659,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -661,6 +680,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -680,6 +700,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -698,6 +719,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -715,6 +737,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -731,6 +754,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -746,6 +770,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -760,6 +785,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
upgradeFrom14_5();
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -773,6 +799,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
try {
upgradeFrom14_6();
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -785,6 +812,7 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
} else if (VERSION_14_7.equals(form.targetVersion)) {
try {
upgradeFrom14_7();
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));
Expand All @@ -794,6 +822,18 @@ public HtmlResponse upgradeFrom(final UpgradeForm form) {
logger.warn("Failed to upgrade data.", e);
saveError(messages -> messages.addErrorsFailedToUpgradeFrom(GLOBAL, VERSION_14_7, e.getLocalizedMessage()));
}
} else if (VERSION_14_8.equals(form.targetVersion)) {
try {
upgradeFrom14_8();
upgradeFromAll();

saveInfo(messages -> messages.addSuccessStartedDataUpdate(GLOBAL));

systemHelper.reloadConfiguration();
} catch (final Exception e) {
logger.warn("Failed to upgrade data.", e);
saveError(messages -> messages.addErrorsFailedToUpgradeFrom(GLOBAL, VERSION_14_8, e.getLocalizedMessage()));
}
} else {
saveError(messages -> messages.addErrorsUnknownVersionForUpgrade(GLOBAL));
}
Expand Down Expand Up @@ -966,6 +1006,10 @@ private void upgradeFrom14_7() {
// nothing
}

private void upgradeFrom14_8() {
// nothing
}

private void upgradeFromAll() {
// nothing
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/codelibs/fess/helper/SystemHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void init() {
logger.debug("Initialize {}", this.getClass().getSimpleName());
}
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
cal.set(2024, 11 - 1, 1); // EOL Date
cal.set(2024, 12 - 1, 1); // EOL Date
eolTime = cal.getTimeInMillis();
if (isEoled()) {
logger.error("Your system is out of support. See https://fess.codelibs.org/eol.html");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<la:option value="14.5">14.5</la:option>
<la:option value="14.6">14.6</la:option>
<la:option value="14.7">14.7</la:option>
<la:option value="14.8">14.8</la:option>
</la:select>
</div>
</div>
Expand Down

0 comments on commit 5c1e681

Please sign in to comment.