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

Change subject: Sync extension.json with CodeEditor.php and empty php entry 
point
......................................................................


Sync extension.json with CodeEditor.php and empty php entry point

Change-Id: I4e27986911bc73a1247f9e3f0127797fc560df1c
---
M CodeEditor.php
M extension.json
2 files changed, 22 insertions(+), 112 deletions(-)

Approvals:
  TheDJ: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CodeEditor.php b/CodeEditor.php
index fab879c..ea9a1f9 100644
--- a/CodeEditor.php
+++ b/CodeEditor.php
@@ -15,113 +15,15 @@
  * See https://www.mediawiki.org/wiki/Manual:Extension_registration for more 
details.
  */
 
-$wgExtensionCredits['other'][] = array(
-       'path' => __FILE__,
-       'name' => 'CodeEditor',
-       'url' => 'https://www.mediawiki.org/wiki/Extension:CodeEditor',
-       'author' => array( 'Brion Vibber', 'Derk-Jan Hartman', 'authors of Ace 
(ajax.org)' ),
-       'descriptionmsg' => 'codeeditor-desc',
-);
-
-$wgAutoloadClasses['CodeEditorHooks'] = __DIR__ . '/CodeEditor.hooks.php';
-$wgMessagesDirs['CodeEditor'] = __DIR__ . '/i18n';
-
-$wgHooks['EditPage::showEditForm:initial'][] = 
'CodeEditorHooks::editPageShowEditFormInitial';
-$wgHooks['EditPage::showReadOnlyForm:initial'][] = 
'CodeEditorHooks::editPageShowEditFormInitial';
-$wgHooks['BeforePageDisplay'][] = 'CodeEditorHooks::onBeforePageDisplay';
-$wgHooks['MakeGlobalVariablesScript'][] = 
'CodeEditorHooks::onMakeGlobalVariablesScript';
-$wgHooks['GetPreferences'][] = 'CodeEditorHooks::getPreferences';
-
-$tpl = array(
-       'localBasePath' => __DIR__ . '/modules',
-       'remoteExtPath' => 'CodeEditor/modules',
-       'group' => 'ext.wikiEditor',
-);
-
-$wgResourceModules['ext.codeEditor'] = array(
-       'scripts' => 'ext.codeEditor.js',
-       'dependencies' => array(
-               'ext.wikiEditor.toolbar',
-               'jquery.codeEditor'
-       ),
-) + $tpl;
-
-$wgResourceModules['jquery.codeEditor'] = array(
-       'scripts' => 'jquery.codeEditor.js',
-       'styles' => 'jquery.codeEditor.css',
-       'dependencies' => array(
-               'jquery.wikiEditor',
-               'ext.codeEditor.ace',
-               'jquery.ui.resizable',
-               'mediawiki.api',
-               'user.options',
-               'mediawiki.cookie',
-       ),
-       'messages' => array(
-               'codeeditor-next-annotation',
-               'codeeditor-toolbar-toggle',
-               'codeeditor-save-with-errors',
-               'codeeditor-invisibleChars-toggle',
-               'codeeditor-lineWrapping-toggle',
-               'codeeditor-searchReplace-toggle',
-               'codeeditor-gotoline',
-               'codeeditor-indent',
-               'codeeditor-outdent',
-       )
-) + $tpl;
-
-// Minimal bundling of a couple bits of Ace
-$wgResourceModules['ext.codeEditor.ace'] = array(
-       'group' => 'ext.codeEditor.ace',
-       'scripts' => array(
-               'ace/ace.js',
-               'ace/mode-javascript.js',
-               'ace/mode-json.js',
-               'ace/mode-css.js',
-               'ace/mode-lua.js',
-               'ace/ext-language_tools.js',
-       ),
-) + $tpl;
-
-// Extra highlighting modes to match some available GeSHi highlighting 
languages
-$wgResourceModules['ext.codeEditor.ace.modes'] = array(
-       'group' => 'ext.codeEditor.ace',
-       'scripts' => array(
-               'ace/mode-c_cpp.js',
-               'ace/mode-clojure.js',
-               'ace/mode-csharp.js',
-               'ace/mode-coffee.js',
-               'ace/mode-groovy.js',
-               'ace/mode-html.js',
-               'ace/mode-java.js',
-               'ace/mode-ocaml.js',
-               'ace/mode-perl.js',
-               'ace/mode-php.js',
-               'ace/mode-python.js',
-               'ace/mode-ruby.js',
-               'ace/mode-scala.js',
-       ),
-       'dependencies' => 'ext.codeEditor.ace',
-) + $tpl;
-
-// Helper to add inline [edit] links to <source> sections
-$wgResourceModules['ext.codeEditor.geshi'] = array(
-       'scripts' => array(
-               'ext.codeEditor.geshi.js'
-       ),
-       'styles' => array(
-               'ext.codeEditor.geshi.css'
-       ),
-       'messages' => array(
-               'editsection',
-               'savearticle'
-       ),
-       'dependencies' => 'mediawiki.api.parse',
-) + $tpl;
-
-// Experimental feature; not ready yet.
-$wgCodeEditorGeshiIntegration = false;
-
-// If this is disabled, CodeEditor will only be available for client-side code
-// and extensions, it won't be enabled for standard CSS and JS pages.
-$wgCodeEditorEnableCore = true;
+if ( function_exists( 'wfLoadExtension' ) ) {
+       wfLoadExtension( 'CodeEditor' );
+       // Keep i18n globals so mergeMessageFileList.php doesn't break
+       $wgMessagesDirs['CodeEditor'] = __DIR__ . '/i18n';
+       /* wfWarn(
+               'Deprecated PHP entry point used for CodeEditor extension. 
Please use wfLoadExtension instead, ' .
+               'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+       ); */
+       return;
+} else {
+       die( 'This version of the CodeEditor extension requires MediaWiki 
1.25+' );
+}
diff --git a/extension.json b/extension.json
index 1004594..d80c272 100644
--- a/extension.json
+++ b/extension.json
@@ -51,11 +51,19 @@
                                "ext.codeEditor.ace",
                                "jquery.ui.resizable",
                                "mediawiki.api",
-                               "user.options"
+                               "user.options",
+                               "mediawiki.cookie"
                        ],
                        "messages": [
+                               "codeeditor-next-annotation",
                                "codeeditor-toolbar-toggle",
-                               "codeeditor-save-with-errors"
+                               "codeeditor-save-with-errors",
+                               "codeeditor-invisibleChars-toggle",
+                               "codeeditor-lineWrapping-toggle",
+                               "codeeditor-searchReplace-toggle",
+                               "codeeditor-gotoline",
+                               "codeeditor-indent",
+                               "codeeditor-outdent"
                        ],
                        "group": "ext.wikiEditor"
                },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e27986911bc73a1247f9e3f0127797fc560df1c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: TheDJ <hartman.w...@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