mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 08:10:35 +00:00
Merge "ApiVisualEditor: Fix 'false' used as content for non-existent system messages"
This commit is contained in:
commit
7d366a3f6a
|
@ -211,7 +211,10 @@ class ApiVisualEditor extends ApiBase {
|
|||
$content = '';
|
||||
if ( $title->getNamespace() == NS_MEDIAWIKI && $params['section'] !== 'new' ) {
|
||||
// If this is a system message, get the default text.
|
||||
$content = $title->getDefaultMessageText();
|
||||
$msg = $title->getDefaultMessageText();
|
||||
if ( $msg !== false ) {
|
||||
$content = $title->getDefaultMessageText();
|
||||
}
|
||||
}
|
||||
Hooks::run( 'EditFormPreloadText', [ &$content, &$title ] );
|
||||
if ( $content === '' && !empty( $params['preload'] ) ) {
|
||||
|
|
Loading…
Reference in a new issue