From: umherirrender Date: Fri, 25 Oct 2013 16:44:27 +0000 (+0200) Subject: Avoid strip markes on transcluded Special:RecentChanges[Linked] X-Git-Tag: 1.31.0-rc.0~18332 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=f5809f30315c5ed00950ac06be4658ecfc8eb4f7;p=lhc%2Fweb%2Fwiklou.git Avoid strip markes on transcluded Special:RecentChanges[Linked] OutputPage::wrapWikiText results in a Parser::parse call, which should not be done recursively. Using workaround from the warning under https://www.mediawiki.org?oldid=807703#OutputPage-.3EaddWikiText.28.29 This only was happen, when the special page has no result or for RecentChangesLinked a bad title was given. Bug: 56167 Change-Id: I334bc6c36800af80e311301d46c7d48be1b6a055 --- diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index a42a217142..51e7450600 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -517,8 +517,8 @@ class SpecialRecentChanges extends IncludableSpecialPage { } if ( $rows->numRows() === 0 ) { - $this->getOutput()->wrapWikiMsg( - "
\n$1\n
", 'recentchanges-noresult' + $this->getOutput()->addHtml( + '
' . $this->msg( 'recentchanges-noresult' )->parse() . '
' ); } else { $this->getOutput()->addHTML( $rclistOutput ); diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index a844704639..f37ea20720 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -72,7 +72,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges { $outputPage = $this->getOutput(); $title = Title::newFromURL( $target ); if ( !$title || $title->getInterwiki() != '' ) { - $outputPage->wrapWikiMsg( "
\n$1\n
", 'allpagesbadtitle' ); + $outputPage->addHtml( '
' . $this->msg( 'allpagesbadtitle' )->parse() . '
' ); return false; }