From: Brian Wolff Date: Mon, 17 Jan 2011 03:34:08 +0000 (+0000) Subject: Make it so that editintro's included using the editintro url parameter, don't X-Git-Tag: 1.31.0-rc.0~32503 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=3b84269eb2612ecd543a734b6b1a8b405d86e846;p=lhc%2Fweb%2Fwiklou.git Make it so that editintro's included using the editintro url parameter, don't show sections. Its quite counter-intuitive that noinclude sections are included. There was a recent discussion on the Wikinews Water cooler (village pump equivalent) about why interwikis for such templates were being included on pages using the editintro even though the interwiki was in a section. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3b0e3be73c..e829726c1e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -92,6 +92,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN of evaluating wikitext elements like #, :, *, and tables (bug 529). Now this behaviour is only applied to wikitable-start {|, but the first line of a wikitable cell is now treated as a linestart. +* Custom editintro's using the editintro url parameter will no longer show + sections on pages they are included on. === API changes in 1.18 === * (bug 26339) Throw warning when truncating an overlarge API result diff --git a/includes/EditPage.php b/includes/EditPage.php index cb4f761cbb..601ffb32ff 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -766,8 +766,8 @@ class EditPage { $title = Title::newFromText( $this->editintro ); if ( $title instanceof Title && $title->exists() && $title->userCanRead() ) { global $wgOut; - $revision = Revision::newFromTitle( $title ); - $wgOut->addWikiTextTitleTidy( $revision->getText(), $this->mTitle ); + // Added using template syntax, to take 's into account. + $wgOut->addWikiTextTitleTidy( '{{:' . $title->getFullText() . '}}', $this->mTitle ); return true; } else { return false;