Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/373585 )

Change subject: Remove $wgCodeMirrorEnableFrontend
......................................................................

Remove $wgCodeMirrorEnableFrontend

Not needed/used anymore.

Bug: T172470
Change-Id: I9aa03c97bd775248f3a2cfb316df77eb7ef86457
---
M CodeMirror.hooks.php
M extension.json
2 files changed, 5 insertions(+), 8 deletions(-)


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

diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php
index 90c3eff..84afb94 100644
--- a/CodeMirror.hooks.php
+++ b/CodeMirror.hooks.php
@@ -6,21 +6,19 @@
         * Checks, if CodeMirror should be loaded on this page or not.
         *
         * @param IContextSource $context The current ContextSource object
-        * @global bool $wgCodeMirrorEnableFrontend Should CodeMirror be loaded 
on this page
         * @staticvar null|boolean $isEnabled Saves, if CodeMirror should be 
loaded on this page or not
         * @return bool
         */
        private static function isCodeMirrorEnabled( IContextSource $context ) {
-               global $wgCodeMirrorEnableFrontend, $wgCodeMirrorBetaFeature;
+               global $wgCodeMirrorBetaFeature;
                static $isEnabled = null;
 
                // Check, if we already checked, if page action is editing, if 
not, do it now
                if ( $isEnabled === null ) {
-                       if ( $wgCodeMirrorEnableFrontend && 
!$wgCodeMirrorBetaFeature ) {
+                       if ( !$wgCodeMirrorBetaFeature ) {
                                $isEnabled = in_array( Action::getActionName( 
$context ), [ 'edit', 'submit' ] );
                        } else {
-                               $isEnabled = $wgCodeMirrorEnableFrontend &&
-                                       in_array( Action::getActionName( 
$context ), [ 'edit', 'submit' ] ) &&
+                               $isEnabled = in_array( Action::getActionName( 
$context ), [ 'edit', 'submit' ] ) &&
                                        $wgCodeMirrorBetaFeature &&
                                        
ExtensionRegistry::getInstance()->isLoaded( 'BetaFeatures' ) &&
                                        BetaFeatures::isFeatureEnabled(
@@ -69,8 +67,8 @@
         * @param array $preferences
         */
        public static function onGetBetaFeaturePreferences( User $user, 
&$preferences ) {
-               global $wgCodeMirrorEnableFrontend, $wgCodeMirrorBetaFeature, 
$wgExtensionAssetsPath;
-               if ( $wgCodeMirrorEnableFrontend && $wgCodeMirrorBetaFeature ) {
+               global $wgCodeMirrorBetaFeature, $wgExtensionAssetsPath;
+               if ( $wgCodeMirrorBetaFeature ) {
                        $preferences['codemirror-syntax-highlight'] = [
                                'label-message' => 'codemirror-beta-title',
                                'desc-message' => 'codemirror-beta-desc',
diff --git a/extension.json b/extension.json
index 2fd2286..37abc2a 100644
--- a/extension.json
+++ b/extension.json
@@ -162,7 +162,6 @@
                "ext.CodeMirror.visualEditor"
        ],
        "config": {
-               "CodeMirrorEnableFrontend": true,
                "CodeMirrorBetaFeature": false
        },
        "CodeMirrorTagModes": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9aa03c97bd775248f3a2cfb316df77eb7ef86457
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to