From 0363cc1b5e7abd58a5ce5e1c1d1303e2e59116ee Mon Sep 17 00:00:00 2001 From: Rob Church Date: Thu, 4 May 2006 22:04:17 +0000 Subject: [PATCH] * Remove some dud code * Disallow substituting Special pages when included into a page (was puking up a UNIQ_XXXXXXXXX type string) --- RELEASE-NOTES | 1 + includes/Parser.php | 17 +---------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 10bfeb3eaa..d5cd4f7959 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -198,6 +198,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN page doesn't exist * Special:Randompage now additionally accepts English namespace name as parameter * (bug 2981) Really fixed linktrail for Tamil (ta) +* Disallow substituting Special pages when included into a page == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index b4eeb0db5b..958c1bfea8 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2682,20 +2682,6 @@ class Parser } } } - - /*$mwNumUsers =& MagicWord::get( MAG_NUMBEROFUSERS ); - if( $mwNumUsers->matchStartAndRemove( $part1 ) ) { - $mwRawSuffix =& MagicWord::get( MAG_RAWSUFFIX ); - if( $mwRawSuffix->match( $args[0] ) ) { - # Raw and unformatted - $text = $linestart . wfNumberOfUsers(); - } else { - # Default; formatted form - $text = $linestart . $wgContLang->formatNum( wfNumberOfUsers() ); - } - $found = true; - } - }*/ # Extensions if ( !$found && substr( $part1, 0, 1 ) == '#' ) { @@ -2767,8 +2753,7 @@ class Parser # Check for excessive inclusion $dbk = $title->getPrefixedDBkey(); if ( $this->incrementIncludeCount( $dbk ) ) { - if ( $title->getNamespace() == NS_SPECIAL && $this->mOptions->getAllowSpecialInclusion() ) { - # Capture special page output + if ( $title->getNamespace() == NS_SPECIAL && $this->mOptions->getAllowSpecialInclusion() && $this->mOutputType != OT_WIKI ) { $text = SpecialPage::capturePath( $title ); if ( is_string( $text ) ) { $found = true; -- 2.20.1