mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AJAXPoll
synced 2024-11-23 14:36:54 +00:00
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:
parent
dbe3017ec9
commit
e37a2fd2be
|
@ -11,7 +11,7 @@
|
||||||
"type": "parserhook",
|
"type": "parserhook",
|
||||||
"license-name": "GFDL-1.2",
|
"license-name": "GFDL-1.2",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.34.0"
|
"MediaWiki": ">= 1.35.3"
|
||||||
},
|
},
|
||||||
"GroupPermissions": {
|
"GroupPermissions": {
|
||||||
"*": {
|
"*": {
|
||||||
|
|
|
@ -52,7 +52,7 @@ class AJAXPoll {
|
||||||
$input = trim( strip_tags( $input ) );
|
$input = trim( strip_tags( $input ) );
|
||||||
$lines = explode( "\n", trim( $input ) );
|
$lines = explode( "\n", trim( $input ) );
|
||||||
|
|
||||||
$dbw = wfGetDB( DB_MASTER );
|
$dbw = wfGetDB( DB_PRIMARY );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register poll in the database
|
* 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, '' );
|
return self::buildHTML( $id, $user, $readonly, '' );
|
||||||
}
|
}
|
||||||
|
|
||||||
$dbw = wfGetDB( DB_MASTER );
|
$dbw = wfGetDB( DB_PRIMARY );
|
||||||
|
|
||||||
if ( $answer != 0 ) {
|
if ( $answer != 0 ) {
|
||||||
$answer = ++$answer;
|
$answer = ++$answer;
|
||||||
|
|
|
@ -45,7 +45,7 @@ class MigrateOldAJAXPollUserColumnsToActor extends LoggedUpdateMaintenance {
|
||||||
* @return bool True to log the update as done
|
* @return bool True to log the update as done
|
||||||
*/
|
*/
|
||||||
protected function doDBUpdates() {
|
protected function doDBUpdates() {
|
||||||
$dbw = $this->getDB( DB_MASTER );
|
$dbw = $this->getDB( DB_PRIMARY );
|
||||||
|
|
||||||
if ( $dbw->fieldExists( 'ajaxpoll_vote', 'poll_vote_id', __METHOD__ ) ) {
|
if ( $dbw->fieldExists( 'ajaxpoll_vote', 'poll_vote_id', __METHOD__ ) ) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue