mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Follow-up If67bab93: Try to unbreak content model checking more
Some code was expecting an associative array with content model IDs as keys, and some wwas expecting a numeric array. Make it work more like namespace checks. Change-Id: I804db88ed4562a6eea2b6723cb5cc8ae39d7c08f
This commit is contained in:
parent
1aeedf2f4b
commit
e91fd07a5c
|
@ -674,12 +674,14 @@ class VisualEditorHooks {
|
|||
$namespace :
|
||||
MWNamespace::getCanonicalIndex( strtolower( $namespace ) );
|
||||
}, array_keys( array_filter( $availableNamespaces ) ) );
|
||||
$availableContentModels = $veConfig->get( 'VisualEditorAvailableContentModels' );
|
||||
$enabledContentModels = array_keys( array_filter( $availableContentModels ) );
|
||||
|
||||
$vars['wgVisualEditorConfig'] = [
|
||||
'disableForAnons' => $veConfig->get( 'VisualEditorDisableForAnons' ),
|
||||
'preferenceModules' => $veConfig->get( 'VisualEditorPreferenceModules' ),
|
||||
'namespaces' => $enabledNamespaces,
|
||||
'contentModels' => $veConfig->get( 'VisualEditorAvailableContentModels' ),
|
||||
'contentModels' => $enabledContentModels,
|
||||
'signatureNamespaces' => array_values(
|
||||
array_filter( $enabledNamespaces, 'MWNamespace::wantSignatures' )
|
||||
),
|
||||
|
|
|
@ -103,7 +103,10 @@
|
|||
"Category": true,
|
||||
"_merge_strategy": "array_plus"
|
||||
},
|
||||
"VisualEditorAvailableContentModels": [ "wikitext" ],
|
||||
"VisualEditorAvailableContentModels": {
|
||||
"wikitext": true,
|
||||
"_merge_strategy": "array_plus"
|
||||
},
|
||||
"VisualEditorSkinToolbarScrollOffset": [],
|
||||
"VisualEditorParsoidTimeout": 100,
|
||||
"VisualEditorUseSingleEditTab": false,
|
||||
|
|
Loading…
Reference in a new issue