From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jun 2011 11:28:20 +0200 Subject: update to MediaWiki 1.17.0 --- includes/parser/Parser_DiffTest.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'includes/parser/Parser_DiffTest.php') diff --git a/includes/parser/Parser_DiffTest.php b/includes/parser/Parser_DiffTest.php index 608c883a..c6dd76e5 100644 --- a/includes/parser/Parser_DiffTest.php +++ b/includes/parser/Parser_DiffTest.php @@ -1,4 +1,9 @@ conf = $conf; - $this->dtUniqPrefix = "\x7fUNIQ" . Parser::getRandomString(); } function init() { @@ -102,14 +106,18 @@ class Parser_DiffTest function setFunctionHook( $id, $callback, $flags = 0 ) { $this->init(); - foreach ( $this->parsers as $i => $parser ) { + foreach ( $this->parsers as $parser ) { $parser->setFunctionHook( $id, $callback, $flags ); } } function onClearState( &$parser ) { // hack marker prefixes to get identical output - $parser->mUniqPrefix = $this->dtUniqPrefix; + if ( !isset( $this->dtUniqPrefix ) ) { + $this->dtUniqPrefix = $parser->uniqPrefix(); + } else { + $parser->mUniqPrefix = $this->dtUniqPrefix; + } return true; } } -- cgit v1.2.3-54-g00ecf