* @author Niklas Laxström
* @ingroup Cache
*/
+use MediaWiki\MediaWikiServices;
/**
* Caches user genders when needed to use correct namespace aliases.
protected $missLimit = 1000;
/**
+ * @deprecated in 1.28 see MediaWikiServices::getInstance()->getGenderCache()
* @return GenderCache
*/
public static function singleton() {
- static $that = null;
- if ( $that === null ) {
- $that = new self();
- }
-
- return $that;
- }
-
- protected function __construct() {
+ return MediaWikiServices::getInstance()->getGenderCache();
}
/**
return;
}
- $dbr = wfGetDB( DB_SLAVE );
+ $dbr = wfGetDB( DB_REPLICA );
$table = [ 'user', 'user_properties' ];
$fields = [ 'user_name', 'up_value' ];
$conds = [ 'user_name' => $usersToCheck ];