X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=thumb.php;h=13dbc0e767ca3742e3d8d68e288b165abb95edbc;hb=a9a8f6a470f79044eadc02e1ccfe5530ca504498;hp=4e5c2134d3111e9bb092bc5e6c4783490651f112;hpb=7426d04a703580552fe27d06d3566f1ae63ae92f;p=lhc%2Fweb%2Fwiklou.git diff --git a/thumb.php b/thumb.php index 4e5c2134d3..13dbc0e767 100644 --- a/thumb.php +++ b/thumb.php @@ -91,6 +91,7 @@ function wfThumbHandle404() { */ function wfStreamThumb( array $params ) { global $wgVaryOnXFP; + $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); $headers = []; // HTTP headers to send @@ -154,9 +155,8 @@ function wfStreamThumb( array $params ) { // Check permissions if there are read restrictions $varyHeader = []; - if ( !in_array( 'read', User::getGroupPermissions( [ '*' ] ), true ) ) { + if ( !in_array( 'read', $permissionManager->getGroupPermissions( [ '*' ] ), true ) ) { $user = RequestContext::getMain()->getUser(); - $permissionManager = MediaWikiServices::getInstance()->getPermissionManager(); $imgTitle = $img->getTitle(); if ( !$imgTitle || !$permissionManager->userCan( 'read', $user, $imgTitle ) ) {