* @version first release
*/
+use MediaWiki\Shell\Shell;
+
require_once __DIR__ . '/Maintenance.php';
/**
// Do not use wfShellWikiCmd, because mwdoc-filter.php is not
// a Maintenance script.
- $this->inputFilter = wfEscapeShellArg( [
+ $this->inputFilter = Shell::escape( [
$wgPhpCli,
$IP . '/maintenance/mwdoc-filter.php'
] );
$tmpFile = tempnam( wfTempDir(), 'MWDocGen-' );
if ( file_put_contents( $tmpFile, $conf ) === false ) {
- $this->error( "Could not write doxygen configuration to file $tmpFile\n",
- /** exit code: */ 1 );
+ $this->fatalError( "Could not write doxygen configuration to file $tmpFile\n" );
}
$command = $this->doxygen . ' ' . $tmpFile;
);
if ( $exitcode !== 0 ) {
- $this->error( "Something went wrong (exit: $exitcode)\n",
- $exitcode );
+ $this->fatalError( "Something went wrong (exit: $exitcode)\n", $exitcode );
}
}
}
-$maintClass = 'MWDocGen';
+$maintClass = MWDocGen::class;
require_once RUN_MAINTENANCE_IF_MAIN;