From 2e44b49a2db3026050b136de9b00f749dd3ff939 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 25 Apr 2014 06:26:49 +0200 Subject: Update to MediaWiki 1.22.6 --- tests/parser/parserTestsParserHook.php | 66 ---------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 tests/parser/parserTestsParserHook.php (limited to 'tests/parser/parserTestsParserHook.php') diff --git a/tests/parser/parserTestsParserHook.php b/tests/parser/parserTestsParserHook.php deleted file mode 100644 index c8b3e897..00000000 --- a/tests/parser/parserTestsParserHook.php +++ /dev/null @@ -1,66 +0,0 @@ - - */ - -class ParserTestParserHook { - - static function setup( &$parser ) { - $parser->setHook( 'tag', array( __CLASS__, 'dumpHook' ) ); - $parser->setHook( 'statictag', array( __CLASS__, 'staticTagHook' ) ); - return true; - } - - static function dumpHook( $in, $argv ) { - return "
\n" .
-			var_export( $in, true ) . "\n" .
-			var_export( $argv, true ) . "\n" .
-			"
"; - } - - static function staticTagHook( $in, $argv, $parser ) { - if ( !count( $argv ) ) { - $parser->static_tag_buf = $in; - return ''; - } elseif ( count( $argv ) === 1 && isset( $argv['action'] ) - && $argv['action'] === 'flush' && $in === null - ) { - // Clear the buffer, we probably don't need to - if ( isset( $parser->static_tag_buf ) ) { - $tmp = $parser->static_tag_buf; - } else { - $tmp = ''; - } - $parser->static_tag_buf = null; - return $tmp; - } else { // wtf? - return - "\nCall this extension as string or as" . - " , not in any other way.\n" . - "text: " . var_export( $in, true ) . "\n" . - "argv: " . var_export( $argv, true ) . "\n"; - } - } -} -- cgit v1.2.2