Introduce EditFormPreloadText hook, see docs/hooks.txt for more information

This commit is contained in:
Rob Church 2006-06-14 13:12:08 +00:00
parent ddcb4f5cec
commit 11ea8511f2
3 changed files with 7 additions and 0 deletions

View file

@ -494,6 +494,7 @@ Some default configuration options have changed:
* (bug 6280) Correct GRAMMAR for Slovenian localisation (sl)
* (bug 6162) Change date format for Dutch Low Saxon (nds-nl)
* (bug 6296) Update to Indonesian localisation (id) #21
* Introduce EditFormPreloadText hook, see docs/hooks.txt for more information
== Compatibility ==

View file

@ -302,6 +302,10 @@ $diff: DifferenceEngine object that's calling
$oldRev: Revision object of the "old" revision (may be null/invalid)
$newRev: Revision object of the "new" revision
'EditFormPreloadText': Allows population of the edit form when creating new pages
&$text: Text to preload with
&$title: Title object representing the page being created
'EditFilter': Perform checks on an edit
$editor: Edit form (see includes/EditPage.php)
$text: Contents of the edit box

View file

@ -304,6 +304,8 @@ class EditPage {
# checking, etc.
if ( 'initial' == $this->formtype || $this->firsttime ) {
$this->initialiseForm();
if( !$this->mTitle->getArticleId() )
wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mTitle ) );
}
$this->showEditForm();