X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fmwdocgen.php;h=5e505eba578681a65bc95c541bdef97ccfb6a906;hb=0f14e09a596f59e0d0326d8960d10a7b384bea41;hp=e36674e400ab880a2570ec907dcea9888e507eba;hpb=c381fea1402e0542b754d63d961ca058948fa1d9;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index e36674e400..5e505eba57 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -43,7 +43,7 @@ # Variables / Configuration # -if ( php_sapi_name() != 'cli' ) { +if ( PHP_SAPI != 'cli' ) { echo 'Run "' . __FILE__ . '" from the command line.'; die( -1 ); } @@ -114,8 +114,7 @@ function readaline( $prompt = '' ) { * @param $doxyGenerateMan Boolean * @return string */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $excludePatterns, $doxyGenerateMan ) { - global $doxygenInputFilter; +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $excludePatterns, $doxyGenerateMan, $doxygenInputFilter ) { $template = file_get_contents( $doxygenTemplate ); // Replace template placeholders by correct values. @@ -132,7 +131,7 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, ); $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template ); $tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' ); - file_put_contents( $tmpFileName , $tmpCfg ) or die( "Could not write doxygen configuration to file $tmpFileName\n" ); + file_put_contents( $tmpFileName, $tmpCfg ) or die( "Could not write doxygen configuration to file $tmpFileName\n" ); return $tmpFileName; } @@ -242,7 +241,7 @@ $version = 'master'; $excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths ); print "EXCLUDE: $excludedPaths\n\n"; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan, $doxygenInputFilter ); $command = $doxygenBin . ' ' . $generatedConf; echo <<