From 072d9c945ccec820a04ee399f3775757e4652506 Mon Sep 17 00:00:00 2001 From: libraryupgrader Date: Sun, 24 Sep 2017 05:29:05 +0000 Subject: [PATCH] build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 Change-Id: Ie0106bd59ebf06a333596cd914292f7846e8fa23 --- MathRenderer.php | 6 +++--- MathTexvc.php | 4 ++-- composer.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MathRenderer.php b/MathRenderer.php index f65ee01..635846f 100644 --- a/MathRenderer.php +++ b/MathRenderer.php @@ -241,7 +241,7 @@ abstract class MathRenderer { public function getInputHash() { // TODO: What happens if $tex is empty? if ( !$this->inputHash ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); return $dbr->encodeBlob( pack( "H32", $this->getMd5() ) ); # Binary packed, not hex } return $this->inputHash; @@ -253,7 +253,7 @@ abstract class MathRenderer { * @return string md5 */ private static function dbHash2md5( $hash ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $xhash = unpack( 'H32md5', $dbr->decodeBlob( $hash ) . " " ); return $xhash['md5']; } @@ -264,7 +264,7 @@ abstract class MathRenderer { * @return bool true if read successfully, false otherwise */ public function readFromDatabase() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $rpage = $dbr->selectRow( $this->getMathTableName(), $this->dbInArray(), [ 'math_inputhash' => $this->getInputHash() ], diff --git a/MathTexvc.php b/MathTexvc.php index 07c982d..cd692de 100644 --- a/MathTexvc.php +++ b/MathTexvc.php @@ -36,7 +36,7 @@ class MathTexvc extends MathRenderer { */ public function dbOutArray() { $out = []; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $outmd5_sql = $dbr->encodeBlob( pack( 'H32', $this->hash ) ); if ( $outmd5_sql instanceof Blob ) { $outmd5_sql = $outmd5_sql->fetch(); @@ -64,7 +64,7 @@ class MathTexvc extends MathRenderer { parent::initializeFromDatabaseRow( $rpage ); // get deprecated fields if ( $rpage->math_outputhash ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $xhash = unpack( 'H32md5', $dbr->decodeBlob( $rpage->math_outputhash ) . " " ); $this->hash = $xhash['md5']; diff --git a/composer.json b/composer.json index 6b670ed..607cc1e 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "require-dev": { "jakub-onderka/php-parallel-lint": "0.9.2", - "mediawiki/mediawiki-codesniffer": "0.12.0", + "mediawiki/mediawiki-codesniffer": "13.0.0", "jakub-onderka/php-console-highlighter": "0.3.2" }, "scripts": {