X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpIterator.php;h=870d632126460be771ddef075272313cc23cabfe;hb=6b305fcf55b32972396bfa2e90d85abe55c4c0a4;hp=4c04d860b644d7f74ae90ec0f3dfa7222ccbf2e8;hpb=392af46809d831514f49618cdef1e1529d7fddf4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php index 4c04d860b6..870d632126 100644 --- a/maintenance/dumpIterator.php +++ b/maintenance/dumpIterator.php @@ -26,7 +26,7 @@ * @ingroup Maintenance */ -require_once( dirname( __FILE__ ) . '/Maintenance.php' ); +require_once( __DIR__ . '/Maintenance.php' ); /** * Base class for interating over a dump. @@ -62,7 +62,7 @@ abstract class DumpIterator extends Maintenance { return; } - $this->startTime = wfTime(); + $this->startTime = microtime( true ); if ( $this->getOption('dump') == '-' ) { $source = new ImportStreamSource( $this->getStdin() ); @@ -80,7 +80,7 @@ abstract class DumpIterator extends Maintenance { $this->conclusions(); - $delta = wfTime() - $this->startTime; + $delta = microtime( true ) - $this->startTime; $this->error( "Done {$this->count} revisions in " . round($delta, 2) . " seconds " ); if ($delta > 0) $this->error( round($this->count / $delta, 2) . " pages/sec" ); @@ -168,7 +168,7 @@ class SearchDump extends DumpIterator { * @param $rev Revision */ public function processRevision( $rev ) { - if ( preg_match( $this->getOption( 'regex' ), $rev->getText() ) ) { + if ( preg_match( $this->getOption( 'regex' ), $rev->getContent()->getTextForSearchIndex() ) ) { $this->output( $rev->getTitle() . " matches at edit from " . $rev->getTimestamp() . "\n" ); } }