Execute the EditFormPreloadText hook on load for non-existent pages

Note that this does not add support of the preload GET parameter,
which is in T51622.

Bug: T138588
Change-Id: I46ade4de02f15444c1ca5731a475ed89b31960d9
This commit is contained in:
Tpt 2016-06-24 14:46:52 +02:00
parent 4973740ae3
commit 9efd96cced

View file

@ -360,6 +360,10 @@ class ApiVisualEditor extends ApiBase {
} else {
$content = '';
Hooks::run( 'EditFormPreloadText', [ &$content, &$title ] );
if ( $content !== '' ) {
$content = $this->parseWikitextFragment( $title, $content );
}
$baseTimestamp = wfTimestampNow();
$oldid = 0;
$restoring = false;