public function execute() { // Parse the po file. $p = new PoImporter($this->getOption('file')); $p->setProgressCallback(array($this, 'myOutput')); list($changes, $group) = $p->parse(); if (!count($changes)) { $this->output("No changes to import\n"); exit(0); } // Import changes to wiki. $w = new WikiWriter($changes, $group, $this->getOption('user'), !$this->hasOption('really')); $w->setProgressCallback(array($this, 'myOutput')); $w->execute(); }
exit( 1 ); } if ( isset( $options['help'] ) ) { showUsage(); } if ( !isset( $options['file'] ) ) { STDERR( "You need to specify input file" ); exit( 1 ); } /** * Parse the po file. */ $p = new PoImporter( $options['file'] ); list( $changes, $group ) = $p->parse(); if ( !isset( $options['user'] ) ) { STDERR( "You need to specify user name for wiki import" ); exit( 1 ); } if ( !count( $changes ) ) { STDOUT( "No changes to import" ); exit( 0 ); } /** * Import changes to wiki. */