dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mediawiki.Title: Minor optimizations for mw.Title JavaScript code
[lhc/web/wiklou.git]
/
thumb.php
diff --git
a/thumb.php
b/thumb.php
index
4e5c213
..
f425d87
100644
(file)
--- a/
thumb.php
+++ b/
thumb.php
@@
-35,7
+35,7
@@
if ( defined( 'THUMB_HANDLER' ) ) {
wfThumbHandle404();
} else {
// Called directly, use $_GET params
wfThumbHandle404();
} else {
// Called directly, use $_GET params
- wfStreamThumb( $wgRequest->getQueryValues() );
+ wfStreamThumb( $wgRequest->getQueryValues
Only
() );
}
$mediawiki = new MediaWiki();
}
$mediawiki = new MediaWiki();
@@
-91,6
+91,7
@@
function wfThumbHandle404() {
*/
function wfStreamThumb( array $params ) {
global $wgVaryOnXFP;
*/
function wfStreamThumb( array $params ) {
global $wgVaryOnXFP;
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
$headers = []; // HTTP headers to send
$headers = []; // HTTP headers to send
@@
-154,9
+155,8
@@
function wfStreamThumb( array $params ) {
// Check permissions if there are read restrictions
$varyHeader = [];
// 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();
$user = RequestContext::getMain()->getUser();
- $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
$imgTitle = $img->getTitle();
if ( !$imgTitle || !$permissionManager->userCan( 'read', $user, $imgTitle ) ) {
$imgTitle = $img->getTitle();
if ( !$imgTitle || !$permissionManager->userCan( 'read', $user, $imgTitle ) ) {