* EditPageBeforeEditButtons hook now passes EditPage object for reference
authorRyan Schmidt <skizzerz@users.mediawiki.org>
Wed, 13 Feb 2008 00:31:02 +0000 (00:31 +0000)
committerRyan Schmidt <skizzerz@users.mediawiki.org>
Wed, 13 Feb 2008 00:31:02 +0000 (00:31 +0000)
docs/hooks.txt
includes/EditPage.php

index e3c8a95..9e27a8d 100644 (file)
@@ -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()
index c200508..33e4069 100644 (file)
@@ -1962,7 +1962,7 @@ END
                );
                $buttons['diff'] = wfElement('input', $temp, '');
                
-               wfRunHooks( 'EditPageBeforeEditButtons', array( &$buttons ) );
+               wfRunHooks( 'EditPageBeforeEditButtons', array( &$this, &$buttons ) );
                return $buttons;
        }