Add an OutputPage to the EditPage::showEditForm:initial to match the EditPage::showEd...
authorDaniel Friesen <dantman@users.mediawiki.org>
Wed, 15 Feb 2012 19:32:36 +0000 (19:32 +0000)
committerDaniel Friesen <dantman@users.mediawiki.org>
Wed, 15 Feb 2012 19:32:36 +0000 (19:32 +0000)
docs/hooks.txt
includes/EditPage.php

index 209ff2e..e1f261a 100644 (file)
@@ -774,12 +774,13 @@ $request: Webrequest
 return value is ignored (should always return true)
 
 'EditPage::showEditForm:fields': allows injection of form field into edit form
-&$editor: the EditPage instance for reference
-&$out: an OutputPage instance to write to
+$editor: the EditPage instance for reference
+$out: an OutputPage instance to write to
 return value is ignored (should always return true)
 
 'EditPage::showEditForm:initial': before showing the edit form
 $editor: EditPage instance (object)
+$out: an OutputPage instance to write to
 
 Return false to halt editing; you'll need to handle error messages, etc.
 yourself. Alternatively, modifying $error and returning true will cause the
index d409252..28ace46 100644 (file)
@@ -1732,7 +1732,7 @@ class EditPage {
                        $previewOutput = $this->getPreviewText();
                }
 
-               wfRunHooks( 'EditPage::showEditForm:initial', array( &$this ) );
+               wfRunHooks( 'EditPage::showEditForm:initial', array( &$this, &$wgOut ) );
 
                $this->setHeaders();