Show an red error message for a database upgrade error
authorLukBukkit <luk.bukkit@gmail.com>
Sat, 17 Nov 2018 16:45:27 +0000 (17:45 +0100)
committerLukBukkit <luk.bukkit@gmail.com>
Sat, 17 Nov 2018 16:46:12 +0000 (16:46 +0000)
Bug: T209344
Change-Id: I640626e10241ca56d34545d1e99f51872c160242

includes/installer/WebInstallerUpgrade.php
includes/installer/i18n/en.json
includes/installer/i18n/qqq.json

index bf732a4..a6157b5 100644 (file)
@@ -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';
                        }
                }
index baf2b5b..3202ca4 100644 (file)
        "config-sqlite-cant-create-db": "Could not create database file <code>$1</code>.",
        "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 <strong>Continue</strong>.",
+       "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 <strong>Continue</strong>.",
        "config-upgrade-done": "Upgrade complete.\n\nYou can now [$1 start using your wiki].\n\nIf you want to regenerate your <code>LocalSettings.php</code> file, click the button below.\nThis is <strong>not recommended</strong> 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 →",
index 39dbbca..f5dd8d6 100644 (file)
        "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.",