From 15dc43818656913251c38fb69b02e6c6319563c2 Mon Sep 17 00:00:00 2001 From: LukBukkit Date: Sat, 17 Nov 2018 17:45:27 +0100 Subject: [PATCH] Show an red error message for a database upgrade error Bug: T209344 Change-Id: I640626e10241ca56d34545d1e99f51872c160242 --- includes/installer/WebInstallerUpgrade.php | 6 ++++++ includes/installer/i18n/en.json | 1 + includes/installer/i18n/qqq.json | 1 + 3 files changed, 8 insertions(+) diff --git a/includes/installer/WebInstallerUpgrade.php b/includes/installer/WebInstallerUpgrade.php index bf732a4b3e..a6157b554e 100644 --- a/includes/installer/WebInstallerUpgrade.php +++ b/includes/installer/WebInstallerUpgrade.php @@ -74,6 +74,12 @@ class WebInstallerUpgrade extends WebInstallerPage { $this->setVar( '_UpgradeDone', true ); $this->showDoneMessage(); + return 'output'; + } else { + $this->startForm(); + $this->parent->showError( 'config-upgrade-error' ); + $this->endForm(); + return 'output'; } } diff --git a/includes/installer/i18n/en.json b/includes/installer/i18n/en.json index baf2b5b344..3202ca44dc 100644 --- a/includes/installer/i18n/en.json +++ b/includes/installer/i18n/en.json @@ -145,6 +145,7 @@ "config-sqlite-cant-create-db": "Could not create database file $1.", "config-sqlite-fts3-downgrade": "PHP is missing FTS3 support, downgrading tables.", "config-can-upgrade": "There are MediaWiki tables in this database.\nTo upgrade them to MediaWiki $1, click Continue.", + "config-upgrade-error": "There was an error while upgrading the MediaWiki tables in your database.\n\nFor more information look into the log above, to retry click Continue.", "config-upgrade-done": "Upgrade complete.\n\nYou can now [$1 start using your wiki].\n\nIf you want to regenerate your LocalSettings.php file, click the button below.\nThis is not recommended unless you are having problems with your wiki.", "config-upgrade-done-no-regenerate": "Upgrade complete.\n\nYou can now [$1 start using your wiki].", "config-regenerate": "Regenerate LocalSettings.php →", diff --git a/includes/installer/i18n/qqq.json b/includes/installer/i18n/qqq.json index 39dbbcaec4..f5dd8d6f13 100644 --- a/includes/installer/i18n/qqq.json +++ b/includes/installer/i18n/qqq.json @@ -166,6 +166,7 @@ "config-sqlite-cant-create-db": "Used as SQLite error message. Parameters:\n* $1 - filename", "config-sqlite-fts3-downgrade": "Status message in the MediaWiki installer when SQLite is used without the FTS3 module. The FTS3 feature allows users to create special tables with a built-in full-text index.", "config-can-upgrade": "Parameters:\n* $1 - Version or Revision indicator.", + "config-upgrade-error": "Used as error message.", "config-upgrade-done": "Used as success message. Parameters:\n* $1 - full URL of index.php\nSee also:\n* {{msg-mw|config-upgrade-done-no-regenerate}}", "config-upgrade-done-no-regenerate": "Used as success message. Parameters:\n* $1 - full URL of index.php\nSee also:\n* {{msg-mw|config-upgrade-done}}", "config-regenerate": "This message appears in a button after LocalSettings.php is generated and downloaded at the end of the MediaWiki installation process.", -- 2.20.1