X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fmwdocgen.php;h=43041a43dff8978e21a68daadca3d2351dee3242;hb=02aacff54cdb4440defaad9cb31368a92344d6f6;hp=dc2eccd080ab125d4c22ee8a359721a7163e1e4c;hpb=d716155c8b2d6e4a51a4110195cee7a1794846e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index dc2eccd080..43041a43df 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -72,7 +72,7 @@ class MWDocGen extends Maintenance { } protected function init() { - global $IP; + global $wgPhpCli, $IP; $this->doxygen = $this->getOption( 'doxygen', 'doxygen' ); $this->mwVersion = $this->getOption( 'version', 'master' ); @@ -86,7 +86,13 @@ class MWDocGen extends Maintenance { $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', @@ -99,7 +105,7 @@ class MWDocGen extends Maintenance { $this->excludePatterns[] = 'extensions'; } - $this->doDot = `which dot`; + $this->doDot = shell_exec( 'which dot' ); $this->doMan = $this->hasOption( 'generate-man' ); }