From: Ævar Arnfjörð Bjarmason Date: Tue, 25 Oct 2005 07:35:48 +0000 (+0000) Subject: * New including feature: , see parsertests for uses X-Git-Tag: 1.6.0~1321 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=ec97944263221303a48f6d1927fd8364424ff0fb;p=lhc%2Fweb%2Fwiklou.git * New including feature: , see parsertests for uses --- diff --git a/includes/Parser.php b/includes/Parser.php index 8cc649bd78..7d76377be6 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -766,6 +766,7 @@ class Parser wfProfileIn( $fname ); # Remove tags and sections + $text = strtr( $text, array( '' => '' , '' => '' ) ); $text = strtr( $text, array( '' => '', '' => '') ); $text = preg_replace( '/.*?<\/includeonly>/s', '', $text ); @@ -2490,6 +2491,12 @@ class Parser $this->mTemplatePath[$part1] = 1; if( $this->mOutputType == OT_HTML ) { + if ( in_string( '', $text ) && in_string( '', $text ) ) { + preg_match_all( '/(.*?)<\/onlyinclude>/s', $text, $m ); + $text = ''; + foreach ($m[1] as $piece) + $text .= $piece; + } # Remove sections and tags $text = preg_replace( '/.*?<\/noinclude>/s', '', $text ); $text = strtr( $text, array( '' => '' , '' => '' ) );