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 User::isAllowed with PermissionManager.
[lhc/web/wiklou.git]
/
includes
/
diff
/
DifferenceEngine.php
diff --git
a/includes/diff/DifferenceEngine.php
b/includes/diff/DifferenceEngine.php
index
37ec39a
..
1d3b402
100644
(file)
--- a/
includes/diff/DifferenceEngine.php
+++ b/
includes/diff/DifferenceEngine.php
@@
-198,7
+198,7
@@
class DifferenceEngine extends ContextSource {
*/
protected $isSlotDiffRenderer = false;
*/
protected $isSlotDiffRenderer = false;
- /**
#@-
*/
+ /**
#@-
*/
/**
* @param IContextSource|null $context Context to use, anything else will be ignored
/**
* @param IContextSource|null $context Context to use, anything else will be ignored
@@
-401,7
+401,8
@@
class DifferenceEngine extends ContextSource {
* @return string|bool Link HTML or false
*/
public function deletedLink( $id ) {
* @return string|bool Link HTML or false
*/
public function deletedLink( $id ) {
- if ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+ if ( $permissionManager->userHasRight( $this->getUser(), 'deletedhistory' ) ) {
$dbr = wfGetDB( DB_REPLICA );
$arQuery = Revision::getArchiveQueryInfo();
$row = $dbr->selectRow(
$dbr = wfGetDB( DB_REPLICA );
$arQuery = Revision::getArchiveQueryInfo();
$row = $dbr->selectRow(
@@
-803,7
+804,8
@@
class DifferenceEngine extends ContextSource {
// Build the link
if ( $rcid ) {
$this->getOutput()->preventClickjacking();
// Build the link
if ( $rcid ) {
$this->getOutput()->preventClickjacking();
- if ( $user->isAllowed( 'writeapi' ) ) {
+ if ( MediaWikiServices::getInstance()->getPermissionManager()
+ ->userHasRight( $user, 'writeapi' ) ) {
$this->getOutput()->addModules( 'mediawiki.page.patrol.ajax' );
}
$this->getOutput()->addModules( 'mediawiki.page.patrol.ajax' );
}