Use DB_PRIMARY instead of deprecated DB_MASTER

Raise support floor to 1.35.3 for this.

Change-Id: Ieb1651d5934772fd207d42f70167cd993af0a54b
This commit is contained in:
Alexander Vorwerk 2021-09-18 14:40:40 +02:00
parent dbe3017ec9
commit e37a2fd2be
3 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@
"type": "parserhook",
"license-name": "GFDL-1.2",
"requires": {
"MediaWiki": ">= 1.34.0"
"MediaWiki": ">= 1.35.3"
},
"GroupPermissions": {
"*": {

View file

@ -52,7 +52,7 @@ class AJAXPoll {
$input = trim( strip_tags( $input ) );
$lines = explode( "\n", trim( $input ) );
$dbw = wfGetDB( DB_MASTER );
$dbw = wfGetDB( DB_PRIMARY );
/**
* Register poll in the database
@ -193,7 +193,7 @@ During the last 48 hours, $tab2[0] votes have been given.";
return self::buildHTML( $id, $user, $readonly, '' );
}
$dbw = wfGetDB( DB_MASTER );
$dbw = wfGetDB( DB_PRIMARY );
if ( $answer != 0 ) {
$answer = ++$answer;

View file

@ -45,7 +45,7 @@ class MigrateOldAJAXPollUserColumnsToActor extends LoggedUpdateMaintenance {
* @return bool True to log the update as done
*/
protected function doDBUpdates() {
$dbw = $this->getDB( DB_MASTER );
$dbw = $this->getDB( DB_PRIMARY );
if ( $dbw->fieldExists( 'ajaxpoll_vote', 'poll_vote_id', __METHOD__ ) ) {
return true;