}
protected function init() {
- global $IP;
+ global $wgPhpCli, $IP;
$this->doxygen = $this->getOption( 'doxygen', 'doxygen' );
$this->mwVersion = $this->getOption( 'version', 'master' );
$this->output = $this->getOption( 'output', "$IP/docs" );
- $this->inputFilter = wfShellWikiCmd( $IP . '/maintenance/mwdoc-filter.php' );
+ // Do not use wfShellWikiCmd, because mwdoc-filter.php is not
+ // a Maintenance script.
+ $this->inputFilter = wfEscapeShellArg( [
+ $wgPhpCli,
+ $IP . '/maintenance/mwdoc-filter.php'
+ ] );
+
$this->template = $IP . '/maintenance/Doxyfile';
$this->excludes = [
'vendor',
$this->excludePatterns[] = 'extensions';
}
- $this->doDot = `which dot`;
+ $this->doDot = shell_exec( 'which dot' );
$this->doMan = $this->hasOption( 'generate-man' );
}