[MediaWiki-commits] [Gerrit] mediawiki...MathSearch[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/380189 ) Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 .. build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 Change-Id: Ic97c9bec3f405985a45547d9d2ec86dde91bfa0d --- M GetEquationsByQuery.php M MathObject.php M MathSearch.hooks.php M SpecialMathDownloadResult.php M SpecialUploadResult.php M composer.json M includes/ImportCsv.php M includes/special/SpecialDisplayTopics.php M maintenance/BatchExport.php M maintenance/ExportCache.php M maintenance/IndexBase.php M maintenance/QueryEval.php M maintenance/WmcRefIdentifier.php 13 files changed, 26 insertions(+), 26 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/GetEquationsByQuery.php b/GetEquationsByQuery.php index 292c01d..0bc85d7 100644 --- a/GetEquationsByQuery.php +++ b/GetEquationsByQuery.php @@ -57,7 +57,7 @@ $wgOut->addWikiText( "Displaying first 10 equation for query: " . var_export( $sqlFilter, true ) . '' ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( [ 'math' ], [ diff --git a/MathObject.php b/MathObject.php index fd3acea..aca736d 100644 --- a/MathObject.php +++ b/MathObject.php @@ -21,7 +21,7 @@ public static function hash2md5( $hash ) { // TODO: make MathRenderer::dbHash2md5 public - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $xhash = unpack( 'H32md5', $dbr->decodeBlob( $hash ) . " " ); return $xhash['md5']; } @@ -29,7 +29,7 @@ public static function findSimilarPages( $pid ) { global $wgOut; $out = ""; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); try { $res = $dbr->select( 'mathpagesimilarity', [ @@ -75,7 +75,7 @@ * @return self instance */ public static function constructformpage( $pid, $eid ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->selectRow( [ 'mathindex' ], self::dbIndexFieldsArray(), 'mathindex_revision_id = ' . $pid . ' AND mathindex_anchor= "' . $eid . '"' ); @@ -224,7 +224,7 @@ public function getObservations( $update = true ) { global $wgOut; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); try { $res = $dbr->select( [ "mathobservation", "mathvarstat", 'mathrevisionstat' ], [ @@ -334,7 +334,7 @@ * @return bool|ResultWrapper */ public function getNouns( $identifier ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $pageName = $this->getPageTitle(); if ( $pageName === false ) { return false; @@ -366,7 +366,7 @@ */ public function getAllOccurences( $currentOnly = true ) { $out = []; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'mathindex', self::dbIndexFieldsArray(), [ 'mathindex_inputhash' => $this->getInputHash() ] @@ -468,7 +468,7 @@ } public function getRelations() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $selection = $dbr->select( 'mathsemantics', [ 'identifier', 'evidence', 'noun' ], [ 'revision_id' => $this->revisionID ], __METHOD__, [ 'ORDER BY' => 'evidence desc' ] ); diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index ab4eb15..44b5508 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -79,7 +79,7 @@ private static function updateIndex( $revId, $eid, $inputHash, $tex ) { if ( $revId > 0 && $eid ) { try { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $exists = $dbr->selectRow( 'mathindex', [ 'mathindex_revision_id', 'mathindex_anchor', 'mathindex_inputhash' ], [ diff --git a/SpecialMathDownloadResult.php b/SpecialMathDownloadResult.php index 113ce08..e4cdcc9 100644 --- a/SpecialMathDownloadResult.php +++ b/SpecialMathDownloadResult.php @@ -14,7
[MediaWiki-commits] [Gerrit] mediawiki...MathSearch[master]: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Libraryupgrader has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380189 ) Change subject: build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 .. build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 Change-Id: Ic97c9bec3f405985a45547d9d2ec86dde91bfa0d --- M GetEquationsByQuery.php M MathObject.php M MathSearch.hooks.php M SpecialMathDownloadResult.php M SpecialUploadResult.php M composer.json M includes/ImportCsv.php M includes/special/SpecialDisplayTopics.php M maintenance/BatchExport.php M maintenance/ExportCache.php M maintenance/IndexBase.php M maintenance/QueryEval.php M maintenance/WmcRefIdentifier.php 13 files changed, 26 insertions(+), 26 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch refs/changes/89/380189/1 diff --git a/GetEquationsByQuery.php b/GetEquationsByQuery.php index 292c01d..0bc85d7 100644 --- a/GetEquationsByQuery.php +++ b/GetEquationsByQuery.php @@ -57,7 +57,7 @@ $wgOut->addWikiText( "Displaying first 10 equation for query: " . var_export( $sqlFilter, true ) . '' ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( [ 'math' ], [ diff --git a/MathObject.php b/MathObject.php index fd3acea..aca736d 100644 --- a/MathObject.php +++ b/MathObject.php @@ -21,7 +21,7 @@ public static function hash2md5( $hash ) { // TODO: make MathRenderer::dbHash2md5 public - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $xhash = unpack( 'H32md5', $dbr->decodeBlob( $hash ) . " " ); return $xhash['md5']; } @@ -29,7 +29,7 @@ public static function findSimilarPages( $pid ) { global $wgOut; $out = ""; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); try { $res = $dbr->select( 'mathpagesimilarity', [ @@ -75,7 +75,7 @@ * @return self instance */ public static function constructformpage( $pid, $eid ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->selectRow( [ 'mathindex' ], self::dbIndexFieldsArray(), 'mathindex_revision_id = ' . $pid . ' AND mathindex_anchor= "' . $eid . '"' ); @@ -224,7 +224,7 @@ public function getObservations( $update = true ) { global $wgOut; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); try { $res = $dbr->select( [ "mathobservation", "mathvarstat", 'mathrevisionstat' ], [ @@ -334,7 +334,7 @@ * @return bool|ResultWrapper */ public function getNouns( $identifier ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $pageName = $this->getPageTitle(); if ( $pageName === false ) { return false; @@ -366,7 +366,7 @@ */ public function getAllOccurences( $currentOnly = true ) { $out = []; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $res = $dbr->select( 'mathindex', self::dbIndexFieldsArray(), [ 'mathindex_inputhash' => $this->getInputHash() ] @@ -468,7 +468,7 @@ } public function getRelations() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $selection = $dbr->select( 'mathsemantics', [ 'identifier', 'evidence', 'noun' ], [ 'revision_id' => $this->revisionID ], __METHOD__, [ 'ORDER BY' => 'evidence desc' ] ); diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php index ab4eb15..44b5508 100644 --- a/MathSearch.hooks.php +++ b/MathSearch.hooks.php @@ -79,7 +79,7 @@ private static function updateIndex( $revId, $eid, $inputHash, $tex ) { if ( $revId > 0 && $eid ) { try { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $exists = $dbr->selectRow( 'mathindex', [ 'mathindex_revision_id', 'mathindex_anchor', 'mathindex_inputhash' ], [ diff --git a/SpecialMathDownloadResult.php b/SpecialMathDownloadResult.php index 113ce08..e4cdcc9 100644 --- a/SpecialMathDownloadResult.php +++