From be876831c5bf1b87197be58a0f5eda344fdf5e65 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 5 Jul 2011 12:48:46 +0000 Subject: [PATCH] (bug 5800) Added $formCallback as a parameter to the hook EditPage::showEditForm:initial --- RELEASE-NOTES-1.19 | 2 ++ docs/hooks.txt | 1 + includes/EditPage.php | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 5802892f2d..7239544257 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -64,6 +64,8 @@ production. the relevant section of the category. * (bug 29109) Allow the automatic edit summary for redirect creation show the first bit of the new redirect page. +* (bug 5800) Added $formCallback as a parameter to the hook + EditPage::showEditForm:initial === Bug fixes in 1.19 === * (bug 28868) Show total pages in the subtitle of an image on the diff --git a/docs/hooks.txt b/docs/hooks.txt index 8a00b5a994..004c7e7157 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -726,6 +726,7 @@ return value is ignored (should always return true) 'EditPage::showEditForm:initial': before showing the edit form $editor: EditPage instance (object) +$formCallback: Array for callback of modifying the edit form Return false to halt editing; you'll need to handle error messages, etc. yourself. Alternatively, modifying $error and returning true will cause the diff --git a/includes/EditPage.php b/includes/EditPage.php index aa33ec4335..a62cbfe5ce 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1335,7 +1335,7 @@ class EditPage { $previewOutput = $this->getPreviewText(); } - wfRunHooks( 'EditPage::showEditForm:initial', array( &$this ) ); + wfRunHooks( 'EditPage::showEditForm:initial', array( &$this, &$formCallback ) ); $this->setHeaders(); -- 2.20.1