mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-15 12:00:40 +00:00
Don't pass default pref as fallback to User::getOption()
User::getOption() already handles that, and this code bypassed the hook in User::getDefaultOptions(). Change-Id: I41f9df177988dffd62de0060cb691a97161729e4
This commit is contained in:
parent
74fde6270d
commit
59afdff5d5
|
@ -155,7 +155,7 @@ class PageImages {
|
|||
* @return bool
|
||||
*/
|
||||
public static function onInfoAction( IContextSource $context, &$pageInfo ) {
|
||||
global $wgDefaultUserOptions, $wgThumbLimits;
|
||||
global $wgThumbLimits;
|
||||
|
||||
$imageFile = self::getPageImage( $context->getTitle() );
|
||||
if ( !$imageFile ) {
|
||||
|
@ -163,10 +163,7 @@ class PageImages {
|
|||
return true;
|
||||
}
|
||||
|
||||
$thumbSetting = $context->getUser()->getOption(
|
||||
'thumbsize',
|
||||
$wgDefaultUserOptions['thumbsize']
|
||||
);
|
||||
$thumbSetting = $context->getUser()->getOption( 'thumbsize' );
|
||||
$thumbSize = $wgThumbLimits[$thumbSetting];
|
||||
|
||||
$thumb = $imageFile->transform( array( 'width' => $thumbSize ) );
|
||||
|
|
Loading…
Reference in a new issue