X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=b0d067820a0c9f8eaf2bcb39974bb37490eb8036;hb=825d66bfa44c5dae2b78e2fe4f3b16f16aff4a12;hp=6ec7cb20a3449b84c04bdf828ecbf405537b8522;hpb=875a6f37964b73814ec6101c611cab56cce82428;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index 6ec7cb20a3..b0d067820a 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -61,9 +61,11 @@ abstract class Skin extends ContextSource { /** * Fetch the skinname messages for available skins. + * @deprecated since 1.34, no longer used. * @return string[] */ static function getSkinNameMessages() { + wfDeprecated( __METHOD__, '1.34' ); $messages = []; foreach ( self::getSkinNames() as $skinKey => $skinName ) { $messages[] = "skinname-$skinKey"; @@ -459,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'; } } @@ -723,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';