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 --- extensions/LocalisationUpdate/.gitreview | 5 -- extensions/LocalisationUpdate/tests/tokenTest.php | 91 ----------------------- 2 files changed, 96 deletions(-) delete mode 100644 extensions/LocalisationUpdate/.gitreview delete mode 100644 extensions/LocalisationUpdate/tests/tokenTest.php (limited to 'extensions/LocalisationUpdate') diff --git a/extensions/LocalisationUpdate/.gitreview b/extensions/LocalisationUpdate/.gitreview deleted file mode 100644 index da37d04d..00000000 --- a/extensions/LocalisationUpdate/.gitreview +++ /dev/null @@ -1,5 +0,0 @@ -[gerrit] -host=gerrit.wikimedia.org -port=29418 -project=mediawiki/extensions/LocalisationUpdate.git -defaultbranch=master diff --git a/extensions/LocalisationUpdate/tests/tokenTest.php b/extensions/LocalisationUpdate/tests/tokenTest.php deleted file mode 100644 index 1112313c..00000000 --- a/extensions/LocalisationUpdate/tests/tokenTest.php +++ /dev/null @@ -1,91 +0,0 @@ -getVars(); - $retval = @$vars[$varname]; - } catch( Exception $e ) { - print $e . "\n"; - $retval = null; - } - return $retval; -} - -function quickTokenExtractArray( $php, $varname ) { - $reader = new QuickArrayReader("getVar( $varname ); -} - - -if( count( $args ) ) { - $sources = $args; -} else { - $sources = - array_merge( - glob("$IP/extensions/*/*.i18n.php"), - glob("$IP/languages/messages/Messages*.php") ); -} - -foreach( $sources as $sourceFile ) { - $rel = basename( $sourceFile ); - $out = str_replace( '/', '-', $rel ); - - $sourceData = file_get_contents( $sourceFile ); - - if( preg_match( '!extensions/!', $sourceFile ) ) { - $sourceData = LocalisationUpdate::cleanupExtensionFile( $sourceData ); - $items = 'langs'; - } else { - $sourceData = LocalisationUpdate::cleanupFile( $sourceData ); - $items = 'messages'; - } - - file_put_contents( "$out.txt", $sourceData ); - - $start = microtime(true); - $eval = evalExtractArray( $sourceData, 'messages' ); - $deltaEval = microtime(true) - $start; - - $start = microtime(true); - $quick = quickTokenExtractArray( $sourceData, 'messages' ); - $deltaQuick = microtime(true) - $start; - - $start = microtime(true); - $token = confExtractArray( $sourceData, 'messages' ); - $deltaToken = microtime(true) - $start; - - $hashEval = md5(serialize($eval)); - $hashToken = md5(serialize($token)); - $hashQuick = md5(serialize($quick)); - $countEval = count( (array)$eval); - $countToken = count( (array)$token ); - $countQuick = count( (array)$quick ); - - printf( "%s %s %d $items - %0.1fms - eval\n", $rel, $hashEval, $countEval, $deltaEval * 1000 ); - printf( "%s %s %d $items - %0.1fms - QuickArrayReader\n", $rel, $hashQuick, $countQuick, $deltaQuick * 1000 ); - printf( "%s %s %d $items - %0.1fms - ConfEditor\n", $rel, $hashToken, $countToken, $deltaToken * 1000 ); - - if( $hashEval !== $hashToken || $hashEval !== $hashQuick ) { - echo "FAILED on $rel\n"; - file_put_contents( "$out-eval.txt", var_export( $eval, true ) ); - file_put_contents( "$out-token.txt", var_export( $token, true ) ); - file_put_contents( "$out-quick.txt", var_export( $quick, true ) ); - #die("check eval.txt and token.txt\n"); - } - echo "\n"; -} - -echo "ok\n"; - -- cgit v1.2.2