dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace usages of deprecated User::isAllowed. Step 2.
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialRecentChangesLinked.php
diff --git
a/includes/specials/SpecialRecentChangesLinked.php
b/includes/specials/SpecialRecentChangesLinked.php
index
8865654
..
0921ada
100644
(file)
--- a/
includes/specials/SpecialRecentChangesLinked.php
+++ b/
includes/specials/SpecialRecentChangesLinked.php
@@
-21,6
+21,8
@@
* @ingroup SpecialPage
*/
* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
+
/**
* This is to display changes made to all articles linked in an article.
*
/**
* 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();
// 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', [
$tables[] = 'watchlist';
$select[] = 'wl_user';
$join_conds['watchlist'] = [ 'LEFT JOIN', [
@@
-229,13
+234,7
@@
class SpecialRecentChangesLinked extends SpecialRecentChanges {
$sql = $dbr->limitResult( $sql, $limit, false );
}
$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 ) {
}
function setTopText( FormOptions $opts ) {