/** Variable to get user input */
$input = '';
-$exclude_patterns = '';
+$excludePatterns = '';
/** Whether to generates man pages: */
-$wgDoxyGenerateMan = false;
+$doxyGenerateMan = false;
#
# Functions
* @param $svnstat String: path to the svnstat file
* @param $input String: Path to analyze.
* @param $exclude String: Additionals path regex to exclude
- * @param $exclude_patterns String: Additionals path regex to exclude
+ * @param $excludePatterns String: Additionals path regex to exclude
* (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded)
+ * @param $doxyGenerateMan Boolean
* @return string
*/
-function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $exclude_patterns ) {
-
- global $wgDoxyGenerateMan;
+function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $excludePatterns, $doxyGenerateMan ) {
$template = file_get_contents( $doxygenTemplate );
'{{SVNSTAT}}' => $svnstat,
'{{INPUT}}' => $input,
'{{EXCLUDE}}' => $exclude,
- '{{EXCLUDE_PATTERNS}}' => $exclude_patterns,
+ '{{EXCLUDE_PATTERNS}}' => $excludePatterns,
'{{HAVE_DOT}}' => `which dot` ? 'YES' : 'NO',
- '{{GENERATE_MAN}}' => $wgDoxyGenerateMan ? 'YES' : 'NO',
+ '{{GENERATE_MAN}}' => $doxyGenerateMan ? 'YES' : 'NO',
);
$tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
$tmpFileName = tempnam( wfTempDir(), 'mwdocgen-' );
}
break;
case '--generate-man':
- $wgDoxyGenerateMan = true;
+ $doxyGenerateMan = true;
break;
case '--help':
print <<<END
break;
case 6:
$input = $mwPath;
- $exclude_patterns = 'extensions';
+ $excludePatterns = 'extensions';
}
$versionNumber = getSvnRevision( $input );
$excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths );
print "EXCLUDE: $excludedPaths\n\n";
-$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $excludedPaths, $exclude_patterns );
+$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $excludedPaths, $excludePatterns, $doxyGenerateMan );
$command = $doxygenBin . ' ' . $generatedConf;
echo <<<TEXT