build: Updating mediawiki/mediawiki-codesniffer to 13.0.0

Change-Id: Ie0106bd59ebf06a333596cd914292f7846e8fa23
This commit is contained in:
libraryupgrader 2017-09-24 05:29:05 +00:00
parent 297da4bd50
commit 072d9c945c
3 changed files with 6 additions and 6 deletions

View File

@ -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() ],

View File

@ -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'];

View File

@ -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": {