mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
VisualEditorHooks: Use the enabledForUser() helper method more
Change-Id: I9ec8a88ea8f0545e16dc1488d52f43c8ce7a93fe
This commit is contained in:
parent
4d396b5dc9
commit
af719282b9
|
@ -474,12 +474,7 @@ class VisualEditorHooks {
|
|||
}
|
||||
|
||||
// Exit if the user doesn't have VE enabled
|
||||
if (
|
||||
!$user->getOption( 'visualeditor-enable' ) ||
|
||||
$user->getOption( 'visualeditor-betatempdisable' ) ||
|
||||
$user->getOption( 'visualeditor-autodisable' ) ||
|
||||
( $config->get( 'VisualEditorDisableForAnons' ) && $user->isAnon() )
|
||||
) {
|
||||
if ( !self::enabledForUser( $user ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -648,12 +643,7 @@ class VisualEditorHooks {
|
|||
|
||||
$user = $skin->getUser();
|
||||
// Exit if the user doesn't have VE enabled
|
||||
if (
|
||||
!$user->getOption( 'visualeditor-enable' ) ||
|
||||
$user->getOption( 'visualeditor-betatempdisable' ) ||
|
||||
$user->getOption( 'visualeditor-autodisable' ) ||
|
||||
( $config->get( 'VisualEditorDisableForAnons' ) && $user->isAnon() )
|
||||
) {
|
||||
if ( !self::enabledForUser( $user ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue