From: Aaron Schulz Date: Sat, 20 Dec 2008 01:15:40 +0000 (+0000) Subject: Add EditPageBeforeEditChecks hook for bug 16713 X-Git-Tag: 1.31.0-rc.0~43870 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=5a90ec26327209da7dd516161155dbd36659018b;p=lhc%2Fweb%2Fwiklou.git Add EditPageBeforeEditChecks hook for bug 16713 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index efb095cf54..c9daed90fe 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -622,6 +622,12 @@ sections. '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" +&$tabindex: HTML tabindex of the last edit check/button + +'EditPageBeforeEditChecks': allows modifying the edit checks below the textarea in the edit form +&$editpage: The current EditPage object +&$checks: Array of edit checks like "watch this page"/"minor edit" +&$tabindex: HTML tabindex of the last edit check/button 'EditSectionLink': Do not use, use DoEditSectionLink instead. $skin: Skin rendering the UI diff --git a/includes/EditPage.php b/includes/EditPage.php index 3852f17be8..4161acb058 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -104,6 +104,10 @@ class EditPage { $this->editFormTextAfterTools = $this->editFormTextBottom = ""; } + + function getArticle() { + return $this->mArticle; + } /** * Fetch initial editing page content. @@ -2081,6 +2085,7 @@ END Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) . " "; } + wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) ); return $checkboxes; } @@ -2158,7 +2163,7 @@ END ); $buttons['diff'] = Xml::element('input', $temp, ''); - wfRunHooks( 'EditPageBeforeEditButtons', array( &$this, &$buttons ) ); + wfRunHooks( 'EditPageBeforeEditButtons', array( &$this, &$buttons, &$tabindex ) ); return $buttons; }