Rename $exclude_patterns to $excludePatterns and
authorPlatonides <platonides@gmail.com>
Sun, 3 Jun 2012 13:38:51 +0000 (15:38 +0200)
committerPlatonides <platonides@gmail.com>
Sun, 3 Jun 2012 13:38:51 +0000 (15:38 +0200)
$wgDoxyGenerateMan to $doxyGenerateMan.

Change-Id: Id6d7d8202c6bdfd31d2bba5603e0682d35c76ad4

maintenance/mwdocgen.php

index a353504..2edeaba 100644 (file)
@@ -77,9 +77,9 @@ $mwExcludePaths = array(
 
 /** Variable to get user input */
 $input = '';
-$exclude_patterns = '';
+$excludePatterns = '';
 /** Whether to generates man pages: */
-$wgDoxyGenerateMan = false;
+$doxyGenerateMan = false;
 
 #
 # Functions
@@ -128,13 +128,12 @@ function getSvnRevision( $dir ) {
  * @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 );
 
@@ -146,9 +145,9 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath,
                '{{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-' );
@@ -186,7 +185,7 @@ if ( is_array( $argv ) ) {
                        }
                        break;
                case '--generate-man':
-                       $wgDoxyGenerateMan = true;
+                       $doxyGenerateMan = true;
                        break;
                case '--help':
                        print <<<END
@@ -252,7 +251,7 @@ case 5:
        break;
 case 6:
        $input = $mwPath;
-       $exclude_patterns = 'extensions';
+       $excludePatterns = 'extensions';
 }
 
 $versionNumber = getSvnRevision( $input );
@@ -268,7 +267,7 @@ if ( $versionNumber === false ) { # Not using subversion ?
 $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