r80434 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80433‎ | r80434 | r80435 >
Date:03:34, 17 January 2011
Author:bawolff
Status:ok
Tags:
Comment:
Make it so that editintro's included using the editintro url parameter, don't
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -766,8 +766,8 @@
767767 $title = Title::newFromText( $this->editintro );
768768 if ( $title instanceof Title && $title->exists() && $title->userCanRead() ) {
769769 global $wgOut;
770 - $revision = Revision::newFromTitle( $title );
771 - $wgOut->addWikiTextTitleTidy( $revision->getText(), $this->mTitle );
 770+ // Added using template syntax, to take <noinclude>'s into account.
 771+ $wgOut->addWikiTextTitleTidy( '{{:' . $title->getFullText() . '}}', $this->mTitle );
772772 return true;
773773 } else {
774774 return false;
Index: trunk/phase3/RELEASE-NOTES
@@ -92,6 +92,8 @@
9393 of evaluating wikitext elements like #, :, *, and tables (bug 529). Now this
9494 behaviour is only applied to wikitable-start {|, but the first line of a wikitable
9595 cell is now treated as a linestart.
 96+* Custom editintro's using the editintro url parameter will no longer show <noinclude>
 97+ sections on pages they are included on.
9698
9799 === API changes in 1.18 ===
98100 * (bug 26339) Throw warning when truncating an overlarge API result

Status & tagging log