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

Change subject: Remove no longer needed ContentHandlerDefaultModelFor hook
......................................................................


Remove no longer needed ContentHandlerDefaultModelFor hook

As of 3b44da3261673 in MediaWiki core, all MediaWiki:*.json pages are
given the JSON content model, so our hook that does the same is no
longer needed.

Change-Id: I8b39edf36b479ca22d74481c3d571d15db69aa1e
---
M VisualEditor.hooks.php
M extension.json
2 files changed, 0 insertions(+), 25 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 7bbb9aa..3b522e7 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -112,28 +112,6 @@
        }
 
        /**
-        * Convert the content model of messages that are actually JSON to JSON.
-        * This only affects validation and UI when saving and editing, not
-        * loading the content.
-        *
-        * @param Title $title
-        * @param string $model
-        * @return bool
-        */
-       public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
-               $messages = array(
-                       'Visualeditor-cite-tool-definition.json',
-                       'Visualeditor-quick-access-characters.json'
-               );
-
-               if ( $title->inNamespace( NS_MEDIAWIKI ) && in_array( 
$title->getText(), $messages ) ) {
-                       $model = CONTENT_MODEL_JSON;
-               }
-
-               return true;
-       }
-
-       /**
         * Changes the Edit tab and adds the VisualEditor tab.
         *
         * This is attached to the MediaWiki 'SkinTemplateNavigation' hook.
diff --git a/extension.json b/extension.json
index 10a4c96..763c9b9 100644
--- a/extension.json
+++ b/extension.json
@@ -133,9 +133,6 @@
                "BeforePageDisplay": [
                        "VisualEditorHooks::onBeforePageDisplay"
                ],
-               "ContentHandlerDefaultModelFor": [
-                       "VisualEditorHooks::onContentHandlerDefaultModelFor"
-               ],
                "SkinEditSectionLinks": [
                        "VisualEditorHooks::onSkinEditSectionLinks"
                ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b39edf36b479ca22d74481c3d571d15db69aa1e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to