X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Factions%2FRawAction.php;h=8fd4e0ad555e7dce6906cd2bc05d13ae80727326;hb=1d286560d2cd4f2adf6138f62a8dfcfad5991c14;hp=f6c4472f2ae8f012713b3c305995f7cc24e08087;hpb=02e9220745bc38b79f3ebc86df9d3b351dfeb042;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index f6c4472f2a..8fd4e0ad55 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -111,7 +111,8 @@ class RawAction extends FormlessAction { $rootPage = strtok( $title->getText(), '/' ); $userFromTitle = User::newFromName( $rootPage, 'usable' ); if ( !$userFromTitle || $userFromTitle->getId() === 0 ) { - $elevated = $this->getUser()->isAllowed( 'editinterface' ); + $elevated = MediaWikiServices::getInstance()->getPermissionManager() + ->userHasRight( $this->getUser(), 'editinterface' ); $elevatedText = $elevated ? 'by elevated ' : ''; $log = LoggerFactory::getInstance( "security" ); $log->warning( @@ -269,9 +270,7 @@ class RawAction extends FormlessAction { * @return string */ public function getContentType() { - // Use getRawVal instead of getVal because we only - // need to match against known strings, there is no - // storing of localised content or other user input. + // Optimisation: Avoid slow getVal(), this isn't user-generated content. $ctype = $this->getRequest()->getRawVal( 'ctype' ); if ( $ctype == '' ) {