From 222b01f5169f1c7e69762e0e8904c24f78f71882 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 11:52:48 +0200 Subject: update to MediaWiki 1.16.0 --- maintenance/mwdocgen.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'maintenance/mwdocgen.php') diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 378229e0..b91922c3 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -61,6 +61,7 @@ $mwPathS = $mwPath.'skins/'; /** Variable to get user input */ $input = ''; +$exclude = ''; # # Functions @@ -128,8 +129,10 @@ function getSvnRevision( $dir ) { * @param $currentVersion String: Version number of the software * @param $svnstat String: path to the svnstat file * @param $input String: Path to analyze. + * @param $exclude String: Additionals path regex to exlcude + * (LocalSettings.php, AdminSettings.php and .svn directories are always excluded) */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input ){ +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude ){ global $tmpPath; $template = file_get_contents( $doxygenTemplate ); @@ -141,6 +144,7 @@ function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, '{{CURRENT_VERSION}}' => $currentVersion, '{{SVNSTAT}}' => $svnstat, '{{INPUT}}' => $input, + '{{EXCLUDE}}' => $exclude, ); $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template ); $tmpFileName = $tmpPath . 'mwdocgen'. rand() .'.tmp'; @@ -168,6 +172,7 @@ if( is_array( $argv ) && isset( $argv[1] ) ) { $file = $argv[2]; } break; + case '--no-extensions': $input = 6; break; } } @@ -182,6 +187,7 @@ Several documentation possibilities: 3 : only maintenance 4 : only skins 5 : only a given file + 6 : all but the extensions directory OPTIONS; while ( !is_numeric($input) ) { @@ -203,6 +209,9 @@ case 5: $file = readaline( "Enter file name $mwPath" ); } $input = $mwPath.$file; +case 6: + $input = $mwPath; + $exclude = 'extensions'; } $versionNumber = getSvnRevision( $input ); @@ -213,7 +222,7 @@ if( $versionNumber === false ){ #Not using subversion ? $version = "trunk (r$versionNumber)"; } -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude ); $command = $doxygenBin . ' ' . $generatedConf; echo <<