X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=b0d067820a0c9f8eaf2bcb39974bb37490eb8036;hb=9e8439e79d67788916d488f645108f79016d9aca;hp=212ac47157d0faa76e8316e7431a28f2f7d3f85f;hpb=c3bb16690419f3c70ebba2839e0d18925c29effa;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 212ac47157..b0d067820a 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -461,7 +461,9 @@ abstract class Skin extends ContextSource { $type = 'ns-subject'; } // T208315: add HTML class when the user can edit the page - if ( $title->quickUserCan( 'edit', $user ) ) { + if ( MediaWikiServices::getInstance()->getPermissionManager() + ->quickUserCan( 'edit', $user, $title ) + ) { $type .= ' mw-editable'; } } @@ -725,14 +727,17 @@ abstract class Skin extends ContextSource { $action = $this->getRequest()->getVal( 'action', 'view' ); $title = $this->getTitle(); $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer(); + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); if ( ( !$title->exists() || $action == 'history' ) && - $title->quickUserCan( 'deletedhistory', $this->getUser() ) + $permissionManager->quickUserCan( 'deletedhistory', $this->getUser(), $title ) ) { $n = $title->isDeleted(); if ( $n ) { - if ( $this->getTitle()->quickUserCan( 'undelete', $this->getUser() ) ) { + if ( $permissionManager->quickUserCan( 'undelete', + $this->getUser(), $this->getTitle() ) + ) { $msg = 'thisisdeleted'; } else { $msg = 'viewdeleted';