jenkins-bot has submitted this change and it was merged.

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(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index fe1bd7b..1540d40 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 ( !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: merged
Gerrit-Change-Id: I687b2344731188133d32faac48e36245e9b03e76
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Seb35 <seb35wikipe...@gmail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Seb35 <seb35wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to