mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 14:06:52 +00:00
Don't hook CustomEditor for MobileFrontend requests
Bug: T334263 Change-Id: I7ccf1ba7e8f227c236a6244bfa91a2b8a9fd5765
This commit is contained in:
parent
3918f80a72
commit
7fb5663188
|
@ -356,6 +356,14 @@ class Hooks {
|
|||
$services = MediaWikiServices::getInstance();
|
||||
$veConfig = $services->getConfigFactory()->makeConfig( 'visualeditor' );
|
||||
|
||||
if ( ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) ) {
|
||||
// If mobilefrontend is involved it can make its own decisions about this
|
||||
$mobFrontContext = MediaWikiServices::getInstance()->getService( 'MobileFrontend.Context' );
|
||||
if ( $mobFrontContext->shouldDisplayMobileView() ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
!self::enabledForUser( $user ) ||
|
||||
self::isUAUnsupported( $req, $veConfig )
|
||||
|
|
Loading…
Reference in a new issue