From: Alexandre Emsenhuber Date: Tue, 4 Sep 2012 16:48:17 +0000 (+0200) Subject: Added missing GPLv2 headers in maintenance scripts. X-Git-Tag: 1.31.0-rc.0~22469 X-Git-Url: http://git.cyclocoop.org/%27.generer_url_ecrire%28%27admin_couteau_suisse%27%2C%27cmd=descrip&outil=boites_privees?a=commitdiff_plain;h=dd6613b6bd501600106239ec4c3e6cfd2982430b;p=lhc%2Fweb%2Fwiklou.git Added missing GPLv2 headers in maintenance scripts. - made file/class documentation more consistent - contains a fix for Id7a04ff8 (2a7478b) Change-Id: I5264105ce1b6ad86a9840e05be1af99f5d6e252a --- diff --git a/maintenance/archives/upgradeLogging.php b/maintenance/archives/upgradeLogging.php index d406ea8d98..2c28011b5a 100644 --- a/maintenance/archives/upgradeLogging.php +++ b/maintenance/archives/upgradeLogging.php @@ -1,6 +1,6 @@ dbw->selectField( $srcTable, 'MIN(log_timestamp)', false, __METHOD__ ); $minTsUnix = wfTimestamp( TS_UNIX, $minTs ); $numRowsCopied = 0; - + while ( true ) { $maxTs = $this->dbw->selectField( $srcTable, 'MAX(log_timestamp)', false, __METHOD__ ); $copyPos = $this->dbw->selectField( $dstTable, 'MAX(log_timestamp)', false, __METHOD__ ); @@ -137,7 +143,7 @@ EOT; $percent = ( $copyPosUnix - $minTsUnix ) / ( $maxTsUnix - $minTsUnix ) * 100; } printf( "%s %.2f%%\n", $copyPos, $percent ); - + # Handle all entries with timestamp equal to $copyPos if ( $copyPos !== null ) { $numRowsCopied += $this->copyExactMatch( $srcTable, $dstTable, $copyPos ); diff --git a/maintenance/benchmarks/Benchmarker.php b/maintenance/benchmarks/Benchmarker.php index 822f1a6a8b..9901b37d10 100644 --- a/maintenance/benchmarks/Benchmarker.php +++ b/maintenance/benchmarks/Benchmarker.php @@ -5,7 +5,7 @@ */ /** - * Create a doxygen subgroup of Maintenance for benchmarks + * Base code for benchmark scripts. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +28,12 @@ */ require_once( __DIR__ . '/../Maintenance.php' ); + +/** + * Base class for benchmark scripts. + * + * @ingroup Benchmark + */ abstract class Benchmarker extends Maintenance { private $results; @@ -61,7 +67,7 @@ abstract class Benchmarker extends Maintenance { $this->results[$bench_number] = array( 'function' => $bench['function'], - 'arguments' => $bench['args'], + 'arguments' => $bench['args'], 'count' => $count, 'delta' => $delta, 'average' => $delta / $count, diff --git a/maintenance/benchmarks/bench_HTTP_HTTPS.php b/maintenance/benchmarks/bench_HTTP_HTTPS.php index fb836c1790..fa76ae2277 100644 --- a/maintenance/benchmarks/bench_HTTP_HTTPS.php +++ b/maintenance/benchmarks/bench_HTTP_HTTPS.php @@ -1,6 +1,8 @@ checkTitleEncoding() and compares its execution time - * against that of mb_check_encoding, if available. + * This little benchmark executes the regexp used in Language->checkTitleEncoding() + * and compares its execution time against that of mb_check_encoding, if available. + * + * @ingroup Benchmark */ class bench_utf8_title_check extends Benchmarker { diff --git a/maintenance/benchmarks/bench_wfIsWindows.php b/maintenance/benchmarks/bench_wfIsWindows.php index cd07fbd642..854398278b 100644 --- a/maintenance/benchmarks/bench_wfIsWindows.php +++ b/maintenance/benchmarks/bench_wfIsWindows.php @@ -1,6 +1,8 @@