Make it so that editintro's included using the editintro url parameter, don't
authorBrian Wolff <bawolff@users.mediawiki.org>
Mon, 17 Jan 2011 03:34:08 +0000 (03:34 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Mon, 17 Jan 2011 03:34:08 +0000 (03:34 +0000)
show <noinclude> 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 <noinclude> section.

RELEASE-NOTES
includes/EditPage.php

index 3b0e3be..e829726 100644 (file)
@@ -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 <noinclude>
+  sections on pages they are included on.
 
 === API changes in 1.18 ===
 * (bug 26339) Throw warning when truncating an overlarge API result
index cb4f761..601ffb3 100644 (file)
@@ -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 <noinclude>'s into account.
+                               $wgOut->addWikiTextTitleTidy( '{{:' . $title->getFullText() . '}}', $this->mTitle );
                                return true;
                        } else {
                                return false;