mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Allow veaction=edit only when content type supports visualeditor
The content type check gets lost by refactor of the condition in
3458d8a27e
for veaction=edit.
That seems wrong as the comment says only with supported content model
Follow-Up: Ie174bc3f16bceb29cb155b9223e0acef70167fd6
Change-Id: I088f358efaa0a00a2bacbf371c80607231c79eb7
This commit is contained in:
parent
8e3dcce2d6
commit
b5359f08cf
|
@ -357,13 +357,13 @@ class Hooks implements
|
|||
|
||||
return (
|
||||
// If forced by the URL parameter, skip the namespace check (T221892) and preference check
|
||||
$req->getVal( 'veaction' ) === 'edit' || (
|
||||
( $req->getVal( 'veaction' ) === 'edit' || (
|
||||
// Only in enabled namespaces
|
||||
ApiVisualEditor::isAllowedNamespace( $veConfig, $title->getNamespace() ) &&
|
||||
|
||||
// Enabled per user preferences
|
||||
self::enabledForUser( $user )
|
||||
) &&
|
||||
) ) &&
|
||||
// Only for pages with a supported content model
|
||||
ApiVisualEditor::isAllowedContentType( $veConfig, $title->getContentModel() )
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue