From 08aa4418c30cfc18ccc69a0f0f9cb9e17be6c196 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 12 Aug 2013 09:28:15 +0200 Subject: Update to MediaWiki 1.21.1 --- maintenance/mwdocgen.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'maintenance/mwdocgen.php') diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 37e626ba..4fad7a7f 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 ); } @@ -116,8 +116,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. @@ -134,7 +133,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; } @@ -248,7 +247,7 @@ case 6: $excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths ); print "EXCLUDE: $excludedPaths\n\n"; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $doxyVersion, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan, $doxygenInputFilter ); $command = $doxygenBin . ' ' . $generatedConf; echo <<