X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fupdate.php;h=ba66c766835f5bf4ce649ee30cf9cda2b0ca06c0;hb=1e90c794e5c96153f92452f35ca7a639f24682d5;hp=5e2947b2dbb5ea27db848f6bd0139f64ff271b5d;hpb=439b819faf168c67b7381083c244a5d5610f85bb;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/update.php b/maintenance/update.php index 5e2947b2db..ba66c76683 100755 --- a/maintenance/update.php +++ b/maintenance/update.php @@ -145,6 +145,16 @@ class UpdateMediaWiki extends Maintenance { # This will vomit up an error if there are permissions problems $db = $this->getDB( DB_MASTER ); + # Check to see whether the database server meets the minimum requirements + /** @var DatabaseInstaller $dbInstallerClass */ + $dbInstallerClass = Installer::getDBInstallerClass( $db->getType() ); + $status = $dbInstallerClass::meetsMinimumRequirement( $db->getServerVersion() ); + if ( !$status->isOK() ) { + // This might output some wikitext like but it should be comprehensible + $text = $status->getWikiText(); + $this->error( $text, 1 ); + } + $this->output( "Going to run database updates for " . wfWikiID() . "\n" ); if ( $db->getType() === 'sqlite' ) { /** @var IMaintainableDatabase|DatabaseSqlite $db */