From 770d7f23d9f8c2f60b4d0bbcdc983a6b1dbc5ca3 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Sun, 26 Nov 2006 13:58:40 +0000 Subject: [PATCH] * Add new editFormPageTop placeholder for text injection * Use that instead of editFormTextTop for undo failure, so it displays above the preview if applicable * for undo failure * Explicitly declare $editFormX as public --- includes/EditPage.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 38439fbc6f..482b4157d3 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -43,10 +43,11 @@ class EditPage { # Placeholders for text injection by hooks (must be HTML) # extensions should take care to _append_ to the present value - var $editFormTextTop; - var $editFormTextAfterWarn; - var $editFormTextAfterTools; - var $editFormTextBottom; + public $editFormPageTop; // Before even the preview + public $editFormTextTop; + public $editFormTextAfterWarn; + public $editFormTextAfterTools; + public $editFormTextBottom; /** * @todo document @@ -58,9 +59,10 @@ class EditPage { $this->mTitle =& $wgTitle; # Placeholders for text injection by hooks (empty per default) - $this->editFormTextTop = ""; - $this->editFormTextAfterWarn = ""; - $this->editFormTextAfterTools = ""; + $this->editFormPageTop = + $this->editFormTextTop = + $this->editFormTextAfterWarn = + $this->editFormTextAfterTools = $this->editFormTextBottom = ""; } @@ -115,8 +117,8 @@ class EditPage { $text = $currev_text; #Give a warning - $this->editFormTextTop = "

" . wfMsg('undofailed') . "

\n" . - '

'.wfMsg('explainundofailed').'

'; + $this->editFormPageTop .= "

" . wfMsg('undofailed') . "

\n" . + '

'.wfMsg('explainundofailed').'

'; } } } @@ -1047,6 +1049,8 @@ class EditPage { $checkboxhtml = $minoredithtml . $watchhtml; + $wgOut->addHTML( $this->editFormPageTop ); + if ( $wgUser->getOption( 'previewontop' ) ) { if ( 'preview' == $this->formtype ) { -- 2.20.1