build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: Ie0106bd59ebf06a333596cd914292f7846e8fa23
This commit is contained in:
parent
297da4bd50
commit
072d9c945c
|
@ -241,7 +241,7 @@ abstract class MathRenderer {
|
||||||
public function getInputHash() {
|
public function getInputHash() {
|
||||||
// TODO: What happens if $tex is empty?
|
// TODO: What happens if $tex is empty?
|
||||||
if ( !$this->inputHash ) {
|
if ( !$this->inputHash ) {
|
||||||
$dbr = wfGetDB( DB_SLAVE );
|
$dbr = wfGetDB( DB_REPLICA );
|
||||||
return $dbr->encodeBlob( pack( "H32", $this->getMd5() ) ); # Binary packed, not hex
|
return $dbr->encodeBlob( pack( "H32", $this->getMd5() ) ); # Binary packed, not hex
|
||||||
}
|
}
|
||||||
return $this->inputHash;
|
return $this->inputHash;
|
||||||
|
@ -253,7 +253,7 @@ abstract class MathRenderer {
|
||||||
* @return string md5
|
* @return string md5
|
||||||
*/
|
*/
|
||||||
private static function dbHash2md5( $hash ) {
|
private static function dbHash2md5( $hash ) {
|
||||||
$dbr = wfGetDB( DB_SLAVE );
|
$dbr = wfGetDB( DB_REPLICA );
|
||||||
$xhash = unpack( 'H32md5', $dbr->decodeBlob( $hash ) . " " );
|
$xhash = unpack( 'H32md5', $dbr->decodeBlob( $hash ) . " " );
|
||||||
return $xhash['md5'];
|
return $xhash['md5'];
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ abstract class MathRenderer {
|
||||||
* @return bool true if read successfully, false otherwise
|
* @return bool true if read successfully, false otherwise
|
||||||
*/
|
*/
|
||||||
public function readFromDatabase() {
|
public function readFromDatabase() {
|
||||||
$dbr = wfGetDB( DB_SLAVE );
|
$dbr = wfGetDB( DB_REPLICA );
|
||||||
$rpage = $dbr->selectRow( $this->getMathTableName(),
|
$rpage = $dbr->selectRow( $this->getMathTableName(),
|
||||||
$this->dbInArray(),
|
$this->dbInArray(),
|
||||||
[ 'math_inputhash' => $this->getInputHash() ],
|
[ 'math_inputhash' => $this->getInputHash() ],
|
||||||
|
|
|
@ -36,7 +36,7 @@ class MathTexvc extends MathRenderer {
|
||||||
*/
|
*/
|
||||||
public function dbOutArray() {
|
public function dbOutArray() {
|
||||||
$out = [];
|
$out = [];
|
||||||
$dbr = wfGetDB( DB_SLAVE );
|
$dbr = wfGetDB( DB_REPLICA );
|
||||||
$outmd5_sql = $dbr->encodeBlob( pack( 'H32', $this->hash ) );
|
$outmd5_sql = $dbr->encodeBlob( pack( 'H32', $this->hash ) );
|
||||||
if ( $outmd5_sql instanceof Blob ) {
|
if ( $outmd5_sql instanceof Blob ) {
|
||||||
$outmd5_sql = $outmd5_sql->fetch();
|
$outmd5_sql = $outmd5_sql->fetch();
|
||||||
|
@ -64,7 +64,7 @@ class MathTexvc extends MathRenderer {
|
||||||
parent::initializeFromDatabaseRow( $rpage );
|
parent::initializeFromDatabaseRow( $rpage );
|
||||||
// get deprecated fields
|
// get deprecated fields
|
||||||
if ( $rpage->math_outputhash ) {
|
if ( $rpage->math_outputhash ) {
|
||||||
$dbr = wfGetDB( DB_SLAVE );
|
$dbr = wfGetDB( DB_REPLICA );
|
||||||
$xhash = unpack( 'H32md5',
|
$xhash = unpack( 'H32md5',
|
||||||
$dbr->decodeBlob( $rpage->math_outputhash ) . " " );
|
$dbr->decodeBlob( $rpage->math_outputhash ) . " " );
|
||||||
$this->hash = $xhash['md5'];
|
$this->hash = $xhash['md5'];
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"jakub-onderka/php-parallel-lint": "0.9.2",
|
"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"
|
"jakub-onderka/php-console-highlighter": "0.3.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue