Merge " HookRunner - Change PreferencesGetLayoutHook params"

This commit is contained in:
jenkins-bot 2022-11-21 13:17:44 +00:00 committed by Gerrit Code Review
commit aef8e35b3f

View file

@ -103,10 +103,12 @@ class Hooks implements
* @see https://www.mediawiki.org/wiki/Manual:Hooks/PreferencesGetLayout
*
* @param bool &$useMobileLayout
* @param Skin $skin
* @param Skin|string $skin
*/
public static function onPreferencesGetLayout( &$useMobileLayout, Skin $skin ) {
if ( $skin->getSkinName() === 'minerva' ) {
public static function onPreferencesGetLayout( &$useMobileLayout, $skin ) {
if ( $skin instanceof Skin && $skin->getSkinName() === 'minerva' ) {
$useMobileLayout = true;
} elseif ( is_string( $skin ) && $skin === 'minerva' ) {
$useMobileLayout = true;
}
}