mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Merge "Add forward compat hack for getBlockInfo/getBlockAsResultStructure"
This commit is contained in:
commit
fdcca9a8f8
|
@ -508,7 +508,18 @@ class ApiVisualEditor extends ApiBase {
|
|||
$block->getPermissionsError( $this->getContext() )
|
||||
)->parseAsBlock(),
|
||||
];
|
||||
$blockinfo = $this->getBlockInfo( $block );
|
||||
|
||||
// HACK: Forward compatibility with changed method name.
|
||||
// Remove this when no longer needed. The old method name was used
|
||||
// only for a few days/weeks during development of MW 1.34.
|
||||
// See discussion on <https://gerrit.wikimedia.org/r/c/mediawiki/core/+/506945>.
|
||||
if ( method_exists( $this, 'getBlockInfo' ) ) {
|
||||
// old name
|
||||
$blockinfo = $this->getBlockInfo( $block );
|
||||
} else {
|
||||
// new name
|
||||
$blockinfo = $this->getBlockDetails( $block );
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: Build a fake EditPage so we can get checkboxes from it
|
||||
|
|
Loading…
Reference in a new issue