X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FDatabaseInstaller.php;h=ba5da6de50693ab217a6e1f4b00040b94d2cf746;hb=fa0f6f34972c0e0f4aac24a03b3efdfc45f256f6;hp=f9479796d6738222bd5d57db7a6374a68bb50b12;hpb=9d37c792b2ee408b6a01b43a1a649e6074c11c34;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index f9479796d6..ce7e29ddb5 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -20,6 +20,8 @@ * @file * @ingroup Deployment */ + +use MediaWiki\MediaWikiServices; use Wikimedia\Rdbms\LBFactorySingle; use Wikimedia\Rdbms\Database; use Wikimedia\Rdbms\IDatabase; @@ -175,6 +177,7 @@ abstract class DatabaseInstaller { * This will return a cached connection if one is available. * * @return Status + * @suppress PhanUndeclaredMethod */ public function getConnection() { if ( $this->db ) { @@ -339,6 +342,7 @@ abstract class DatabaseInstaller { public function setupSchemaVars() { $status = $this->getConnection(); if ( $status->isOK() ) { + // @phan-suppress-next-line PhanUndeclaredMethod $status->value->setSchemaVars( $this->getSchemaVars() ); } else { $msg = __METHOD__ . ': unexpected error while establishing' @@ -359,8 +363,8 @@ abstract class DatabaseInstaller { throw new MWException( __METHOD__ . ': unexpected DB connection error' ); } - \MediaWiki\MediaWikiServices::resetGlobalInstance(); - $services = \MediaWiki\MediaWikiServices::getInstance(); + MediaWikiServices::resetGlobalInstance(); + $services = MediaWikiServices::getInstance(); $connection = $status->value; $services->redefineService( 'DBLoadBalancerFactory', function () use ( $connection ) { @@ -445,8 +449,7 @@ abstract class DatabaseInstaller { * @return string */ public function getReadableName() { - // Messages: config-type-mysql, config-type-postgres, config-type-sqlite, - // config-type-oracle + // Messages: config-type-mysql, config-type-postgres, config-type-sqlite return wfMessage( 'config-type-' . $this->getName() )->text(); } @@ -687,7 +690,7 @@ abstract class DatabaseInstaller { $this->getPasswordBox( 'wgDBpassword', 'config-db-password' ) . $this->parent->getHelpBox( 'config-db-web-help' ); if ( $noCreateMsg ) { - $s .= $this->parent->getWarningBox( wfMessage( $noCreateMsg )->plain() ); + $s .= Html::warningBox( wfMessage( $noCreateMsg )->plain(), 'config-warning-box' ); } else { $s .= $this->getCheckBox( '_CreateDBAccount', 'config-db-web-create' ); }