* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
+
/**
* This is to display changes made to all articles linked in an article.
*
// left join with watchlist table to highlight watched rows
$uid = $this->getUser()->getId();
- if ( $uid && $this->getUser()->isAllowed( 'viewmywatchlist' ) ) {
+ if ( $uid && MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $this->getUser(), 'viewmywatchlist' )
+ ) {
$tables[] = 'watchlist';
$select[] = 'wl_user';
$join_conds['watchlist'] = [ 'LEFT JOIN', [
$sql = $dbr->limitResult( $sql, $limit, false );
}
- $res = $dbr->query( $sql, __METHOD__ );
-
- if ( $res->numRows() == 0 ) {
- $this->mResultEmpty = true;
- }
-
- return $res;
+ return $dbr->query( $sql, __METHOD__ );
}
function setTopText( FormOptions $opts ) {