Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/310510
Change subject: Move DBConnRef and ChronologyProtector to /libs/rdbms ...................................................................... Move DBConnRef and ChronologyProtector to /libs/rdbms Change-Id: If2c4b314a5c39311328843f534d91bf90823e179 --- M autoload.php R includes/libs/rdbms/chronologyprotector/ChronologyProtector.php R includes/libs/rdbms/database/RBConnRef.php 3 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/310510/1 diff --git a/autoload.php b/autoload.php index 3f89c05..b4860c9 100644 --- a/autoload.php +++ b/autoload.php @@ -241,7 +241,7 @@ 'CheckStorage' => __DIR__ . '/maintenance/storage/checkStorage.php', 'CheckSyntax' => __DIR__ . '/maintenance/checkSyntax.php', 'CheckUsernames' => __DIR__ . '/maintenance/checkUsernames.php', - 'ChronologyProtector' => __DIR__ . '/includes/db/ChronologyProtector.php', + 'ChronologyProtector' => __DIR__ . '/includes/libs/rdbms/chronologyprotector/ChronologyProtector.php', 'ClassCollector' => __DIR__ . '/includes/utils/AutoloadGenerator.php', 'CleanupAncientTables' => __DIR__ . '/maintenance/cleanupAncientTables.php', 'CleanupBlocks' => __DIR__ . '/maintenance/cleanupBlocks.php', @@ -299,7 +299,7 @@ 'DBAccessBase' => __DIR__ . '/includes/dao/DBAccessBase.php', 'DBAccessError' => __DIR__ . '/includes/db/DatabaseError.php', 'DBAccessObjectUtils' => __DIR__ . '/includes/dao/DBAccessObjectUtils.php', - 'DBConnRef' => __DIR__ . '/includes/db/DBConnRef.php', + 'DBConnRef' => __DIR__ . '/includes/libs/rdbms/database/RBConnRef.php', 'DBConnectionError' => __DIR__ . '/includes/db/DatabaseError.php', 'DBError' => __DIR__ . '/includes/db/DatabaseError.php', 'DBExpectedError' => __DIR__ . '/includes/db/DatabaseError.php', diff --git a/includes/db/ChronologyProtector.php b/includes/libs/rdbms/chronologyprotector/ChronologyProtector.php similarity index 100% rename from includes/db/ChronologyProtector.php rename to includes/libs/rdbms/chronologyprotector/ChronologyProtector.php diff --git a/includes/db/DBConnRef.php b/includes/libs/rdbms/database/RBConnRef.php similarity index 97% rename from includes/db/DBConnRef.php rename to includes/libs/rdbms/database/RBConnRef.php index 8604295..e606340 100644 --- a/includes/db/DBConnRef.php +++ b/includes/libs/rdbms/database/RBConnRef.php @@ -8,10 +8,10 @@ * @since 1.22 */ class DBConnRef implements IDatabase { - /** @var LoadBalancer */ + /** @var ILoadBalancer */ private $lb; - /** @var DatabaseBase|null */ + /** @var IDatabase|null Live connection handle */ private $conn; /** @var array|null */ @@ -22,13 +22,13 @@ const FLD_WIKI = 2; /** - * @param LoadBalancer $lb - * @param DatabaseBase|array $conn Connection or (server index, group, wiki ID) + * @param ILoadBalancer $lb + * @param IDatabase|array $conn Connection or (server index, group, wiki ID) */ - public function __construct( LoadBalancer $lb, $conn ) { + public function __construct( ILoadBalancer $lb, $conn ) { $this->lb = $lb; - if ( $conn instanceof DatabaseBase ) { - $this->conn = $conn; + if ( $conn instanceof IDatabase ) { + $this->conn = $conn; // live handle } elseif ( count( $conn ) >= 3 && $conn[self::FLD_WIKI] !== false ) { $this->params = $conn; } else { -- To view, visit https://gerrit.wikimedia.org/r/310510 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2c4b314a5c39311328843f534d91bf90823e179 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits