Seb35 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/161685

Change subject: Check the existence of BetaFeatures before adding the 
'visualeditor-enable' preference
......................................................................

Check the existence of BetaFeatures before adding the 'visualeditor-enable' 
preference

To avoid adding it two times.

Bug: 71088
Change-Id: I687b2344731188133d32faac48e36245e9b03e76
---
M VisualEditor.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/85/161685/1

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index fe1bd7b..9ea6ce9 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -255,7 +255,7 @@
 
        public static function onGetPreferences( User $user, array 
&$preferences ) {
                global $wgLang;
-               if ( !array_key_exists( 'visualeditor-enable', $preferences ) ) 
{
+               if ( !array_key_exists( 'visualeditor-enable', $preferences ) 
&& !class_exists( 'BetaFeatures' ) ) {
                        $namespaces = ConfigFactory::getDefaultInstance()
                                ->makeConfig( 'visualeditor' )
                                ->get( 'VisualEditorNamespaces' );

-- 
To view, visit https://gerrit.wikimedia.org/r/161685
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I687b2344731188133d32faac48e36245e9b03e76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Seb35 <seb35wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to