From: Gabriel Wicke Date: Wed, 26 May 2004 21:01:58 +0000 (+0000) Subject: while instead of if X-Git-Tag: 1.5.0alpha1~3198 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=b97850e021b1406508d55e11762e5d02e6f25858;p=lhc%2Fweb%2Fwiklou.git while instead of if --- diff --git a/includes/Parser.php b/includes/Parser.php index cc14f7d9c3..807f5448a3 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2081,10 +2081,12 @@ function wfBraceSubstitution( $matches ) global $wgCurParser; $titleChars = Title::legalChars(); # Double brace substitution, expand bar in {{foo{{bar}}}} - if(preg_match("/{{([$titleChars]*?)}}/", $matches[2], $internalmatches)) { + $i = 0; + while(preg_match("/{{([$titleChars]*?)}}/", $matches[2], $internalmatches) and $i < 30) { $text = wfInternalBraceSubstitution( $internalmatches ); $matches[0] = str_replace($internalmatches[0], $text , $matches[0]); $matches[2] = str_replace($internalmatches[0], $text , $matches[2]); + $i++; } return $wgCurParser->braceSubstitution( $matches );