From 3ab7b9b0d76dc7326a6d3710b7cbf8893cd105dc Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Wed, 13 Feb 2008 00:31:02 +0000 Subject: [PATCH] * EditPageBeforeEditButtons hook now passes EditPage object for reference --- docs/hooks.txt | 1 + includes/EditPage.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/hooks.txt b/docs/hooks.txt index e3c8a956c3..9e27a8d059 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -520,6 +520,7 @@ to be echoed at the top of the edit form as wikitext. Return true without alteri $error to allow the edit to proceed. 'EditPageBeforeEditButtons': allows modifying the edit buttons below the textarea in the edit form +&$editpage: The current EditPage object &$buttons: Array of edit buttons "Save", "Preview", "Live", and "Diff" 'EditSectionLink': Override the return value of Linker::editSectionLink() diff --git a/includes/EditPage.php b/includes/EditPage.php index c20050819d..33e40698c0 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1962,7 +1962,7 @@ END ); $buttons['diff'] = wfElement('input', $temp, ''); - wfRunHooks( 'EditPageBeforeEditButtons', array( &$buttons ) ); + wfRunHooks( 'EditPageBeforeEditButtons', array( &$this, &$buttons ) ); return $buttons; } -- 2.20.1