X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRecentChangesLinked.php;h=0921adaab8750057ad3689ab255fce64db3e3796;hp=88656546e3bdf012bf53eba5e1441140876388f6;hb=7b4eafda0d986180d20f37f2489b70e8eca00df4;hpb=71a2232e5bec59739ec6ade9812ae1bd900deea8 diff --git a/includes/specials/SpecialRecentChangesLinked.php b/includes/specials/SpecialRecentChangesLinked.php index 88656546e3..0921adaab8 100644 --- a/includes/specials/SpecialRecentChangesLinked.php +++ b/includes/specials/SpecialRecentChangesLinked.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * This is to display changes made to all articles linked in an article. * @@ -91,7 +93,10 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { // 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', [ @@ -229,13 +234,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges { $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 ) {