Use IDatabase as return type for BotPassword::getDB
authorUmherirrender <umherirrender_de.wp@web.de>
Tue, 18 Jun 2019 19:40:09 +0000 (21:40 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Tue, 18 Jun 2019 19:40:09 +0000 (21:40 +0200)
There is no guarantee that this is a maintenance able connection,
but drop, create or alter is also not needed in this case

Change-Id: I7dd294b3d28ef8c4e416e826f38ed39f824b2f8f

includes/user/BotPassword.php

index 6db219d..df5edef 100644 (file)
@@ -21,7 +21,7 @@
 use MediaWiki\Auth\AuthenticationResponse;
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Session\BotPasswordSessionProvider;
 use MediaWiki\Auth\AuthenticationResponse;
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Session\BotPasswordSessionProvider;
-use Wikimedia\Rdbms\IMaintainableDatabase;
+use Wikimedia\Rdbms\IDatabase;
 
 /**
  * Utility class for bot passwords
 
 /**
  * Utility class for bot passwords
@@ -71,7 +71,7 @@ class BotPassword implements IDBAccessObject {
        /**
         * Get a database connection for the bot passwords database
         * @param int $db Index of the connection to get, e.g. DB_MASTER or DB_REPLICA.
        /**
         * Get a database connection for the bot passwords database
         * @param int $db Index of the connection to get, e.g. DB_MASTER or DB_REPLICA.
-        * @return IMaintainableDatabase
+        * @return IDatabase
         */
        public static function getDB( $db ) {
                global $wgBotPasswordsCluster, $wgBotPasswordsDatabase;
         */
        public static function getDB( $db ) {
                global $wgBotPasswordsCluster, $wgBotPasswordsDatabase;