jenkins-bot has submitted this change and it was merged. Change subject: fix function onGetPreferences (v 3.1.3) ......................................................................
fix function onGetPreferences (v 3.1.3) It was broken in I6832f4d82ae0497b92ba210ac7960052e4e12143 Change-Id: I1d47ed6356b2aea16d1347d3464ef2cb1584ad3e --- M CodeMirror.hooks.php M CodeMirror.php 2 files changed, 8 insertions(+), 7 deletions(-) Approvals: Pastakhov: Looks good to me, approved jenkins-bot: Verified diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php index cde1824..c787958 100644 --- a/CodeMirror.hooks.php +++ b/CodeMirror.hooks.php @@ -179,12 +179,13 @@ * @return bool Always true */ public static function onGetPreferences( User $user, &$defaultPreferences ) { - if ( self::isCodeMirrorEnabled( RequestContext::getMain() ) ) { - $defaultPreferences['usecodemirror'] = array( - 'type' => 'api', - 'default' => '1', - ); - } + // CodeMirror is enabled by default for users. + // It can be changed by adding '$wgDefaultUserOptions['usecodemirror'] = 0;' into LocalSettings.php + $defaultPreferences['usecodemirror'] = array( + 'type' => 'api', + 'default' => '1', + ); return true; } + } diff --git a/CodeMirror.php b/CodeMirror.php index 9df0571..8474e08 100644 --- a/CodeMirror.php +++ b/CodeMirror.php @@ -15,7 +15,7 @@ die( 'This file is an extension to MediaWiki and thus not a valid entry point.' ); } -const EXT_CODEMIRROR_VERSION = '3.1.2'; +const EXT_CODEMIRROR_VERSION = '3.1.3'; // Register this extension on Special:Version $wgExtensionCredits['parserhook'][] = array( -- To view, visit https://gerrit.wikimedia.org/r/202352 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1d47ed6356b2aea16d1347d3464ef2cb1584ad3e Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/CodeMirror Gerrit-Branch: master Gerrit-Owner: Pastakhov <pastak...@yandex.ru> Gerrit-Reviewer: Pastakhov <pastak...@yandex.ru> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits