X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=thumb.php;h=13dbc0e767ca3742e3d8d68e288b165abb95edbc;hb=8a4917968baece3fccf9428ea7fe7e71be5b3858;hp=4e5c2134d3111e9bb092bc5e6c4783490651f112;hpb=204d0df4d2bb8139109253f3da1df42cd455850c;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 ) ) {