X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpIterator.php;h=9f983c1a04a5f88299ab62ea7f3bdedbd833c7fc;hb=f43fa6f4f0e2cb60b8543daad661b48a3e0653a9;hp=d8bc3a4da725d0c78f63b0e86a92c5e0d4e251a6;hpb=ddbc7124b9a899a58d5e13093e97234bb602c860;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpIterator.php b/maintenance/dumpIterator.php index d8bc3a4da7..9f983c1a04 100644 --- a/maintenance/dumpIterator.php +++ b/maintenance/dumpIterator.php @@ -40,7 +40,7 @@ abstract class DumpIterator extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Does something with a dump"; + $this->addDescription( 'Does something with a dump' ); $this->addOption( 'file', 'File with text to run.', false, true ); $this->addOption( 'dump', 'XML dump to execute all revisions.', false, true ); $this->addOption( 'from', 'Article from XML dump to start from.', false, true ); @@ -76,7 +76,7 @@ abstract class DumpIterator extends Maintenance { $importer = new WikiImporter( $source, $this->getConfig() ); $importer->setRevisionCallback( - array( &$this, 'handleRevision' ) ); + [ $this, 'handleRevision' ] ); $this->from = $this->getOption( 'from', null ); $this->count = 0; @@ -117,7 +117,7 @@ abstract class DumpIterator extends Maintenance { /** * Callback function for each revision, child classes should override * processRevision instead. - * @param DatabaseBase $rev + * @param Database $rev */ public function handleRevision( $rev ) { $title = $rev->getTitle(); @@ -164,7 +164,7 @@ class SearchDump extends DumpIterator { public function __construct() { parent::__construct(); - $this->mDescription = "Runs a regex in the revisions from a dump"; + $this->addDescription( 'Runs a regex in the revisions from a dump' ); $this->addOption( 'regex', 'Searching regex', true, true ); }