summaryrefslogtreecommitdiff
path: root/maintenance/mwdocgen.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-07-28 11:52:48 +0200
commit222b01f5169f1c7e69762e0e8904c24f78f71882 (patch)
tree8e932e12546bb991357ec48eb1638d1770be7a35 /maintenance/mwdocgen.php
parent00ab76a6b686e98a914afc1975812d2b1aaa7016 (diff)
update to MediaWiki 1.16.0
Diffstat (limited to 'maintenance/mwdocgen.php')
-rw-r--r--maintenance/mwdocgen.php15
1 files changed, 12 insertions, 3 deletions
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 <<<TEXT
@@ -233,6 +242,6 @@ echo <<<TEXT
Doxygen execution finished.
Check above for possible errors.
-You might want to deleted the temporary file $generatedConf
+You might want to delete the temporary file $generatedConf
TEXT;