$ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
$dbw = $services->getDBLoadBalancer()->getConnection( DB_MASTER );
- $lockKey = $dbw->getDomainID() . ':usergroups-prune'; // specific to this wiki
+ $lockKey = "{$dbw->getDomainID()}:UserGroupMembership:purge"; // per-wiki
$scopedLock = $dbw->getScopedLockAndFlush( $lockKey, __METHOD__, 0 );
if ( !$scopedLock ) {
return false; // already running
$ugms[$ugm->group] = $ugm;
}
}
+ ksort( $ugms );
return $ugms;
}
// link to the group description page, if it exists
$linkTitle = self::getGroupPage( $group );
+ $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
if ( $linkTitle ) {
if ( $format === 'wiki' ) {
$linkPage = $linkTitle->getFullText();
$groupLink = "[[$linkPage|$groupName]]";
} else {
- $groupLink = Linker::link( $linkTitle, htmlspecialchars( $groupName ) );
+ $groupLink = $linkRenderer->makeLink( $linkTitle, $groupName );
}
} else {
$groupLink = htmlspecialchars( $groupName );