mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Fix Special: title in ApiVisualEditorEdit
We also do this in ApiVisualEditor. Change-Id: I5c27c6e7770d0a5093684cadeaf1786f85dc32ff
This commit is contained in:
parent
cf6ccfd058
commit
21b676452e
|
@ -380,6 +380,10 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
|
|||
$user = $this->getUser();
|
||||
$params = $this->extractRequestParams();
|
||||
$title = Title::newFromText( $params['page'] );
|
||||
if ( $title && $title->isSpecial( 'CollabPad' ) ) {
|
||||
// Convert Special:CollabPad/MyPage to MyPage so we can serialize properly
|
||||
$title = SpecialCollabPad::getSubPage( $title );
|
||||
}
|
||||
if ( !$title ) {
|
||||
$this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $params['page'] ) ] );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue