Skip to content

Commit

Permalink
REL1_34 compatibility (#5)
Browse files Browse the repository at this point in the history
The constant DB_SLAVE, deprecated in 1.28, has been removed. Use DB_REPLICA.

If you want backwards compatibility for MediaWiki < 1.28 add in 
		// Backward compatibility for MW < 1.28.
		if ( !defined( 'DB_REPLICA' ) ) {
			define( 'DB_REPLICA', DB_SLAVE );
		}
  • Loading branch information
Greg Rundlett authored Jun 12, 2020
1 parent 774ddc1 commit ad56b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/CopyWatchers.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ static function getNamespaceNumber ( $ns ) {
static function getPageWatchers ($ns, $title) {

// code adapted from Extension:WhoIsWatching
$dbr = wfGetDB( DB_SLAVE );
$dbr = wfGetDB( DB_REPLICA );
$watchingUserIDs = array();


Expand Down

0 comments on commit ad56b47

Please sign in to comment.