From: Daniel Kinzler Date: Wed, 22 Nov 2006 20:53:11 +0000 (+0000) Subject: Added placeholders for text injection by hooks to EditPage.php X-Git-Tag: 1.31.0-rc.0~55115 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=b0f352cdc2c165c07177265a1b20f4391ca2ab1d;p=lhc%2Fweb%2Fwiklou.git Added placeholders for text injection by hooks to EditPage.php --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c4b1e78e79..ac50b1dfc9 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -211,6 +211,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 7883) Added autoblock whitelisting feature, using which specific ranges can be protected from autoblocking. These ranges are specified, in list format, in the autoblock_whitelist system message. +* Added placeholders for text injection by hooks to EditPage.php == Languages updated == diff --git a/includes/EditPage.php b/includes/EditPage.php index 391badcbb3..33db6fdfbe 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -41,6 +41,13 @@ class EditPage { var $edittime = '', $section = '', $starttime = ''; var $oldid = 0, $editintro = '', $scrolltop = null; + # 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; + /** * @todo document * @param $article @@ -49,6 +56,12 @@ class EditPage { $this->mArticle =& $article; global $wgTitle; $this->mTitle =& $wgTitle; + + # Placeholders for text injection by hooks (empty per default) + $this->editFormTextTop = ""; + $this->editFormTextAfterWarn = ""; + $this->editFormTextAfterTools = ""; + $this->editFormTextBottom = ""; } /** @@ -1020,6 +1033,8 @@ class EditPage { } + $wgOut->addHTML( $this->editFormTextTop ); + # if this is a comment, show a subject line at the top, which is also the edit summary. # Otherwise, show a summary field at the bottom $summarytext = htmlspecialchars( $wgContLang->recodeForEdit( $this->summary ) ); # FIXME @@ -1161,6 +1176,7 @@ END " ); $wgOut->addWikiText( $copywarn ); + $wgOut->addHTML( $this->editFormTextAfterWarn ); $wgOut->addHTML( " {$metadata} {$editsummary} @@ -1180,6 +1196,7 @@ END "); $wgOut->addWikiText( wfMsgForContent( 'edittools' ) ); + $wgOut->addHTML( $this->editFormTextAfterTools ); $wgOut->addHTML( "
@@ -1224,6 +1241,7 @@ END $wgOut->addHTML( "" ); } + $wgOut->addHTML( $this->editFormTextBottom ); $wgOut->addHTML( "\n" ); if ( !$wgUser->getOption( 'previewontop' ) ) {