Recentchanges optimization: avoid a lot of senseless parsing of link text coming...
[lhc/web/wiklou.git] / maintenance / mwdocgen.php
index b5c788c..ba95e9f 100755 (executable)
@@ -30,28 +30,17 @@ if( php_sapi_name() != 'cli' ) {
 #$pdExec       = '/usr/bin/phpdoc';
 $pdExec = 'phpdoc';
 
-/** Figure out the base directory. This is harder than it should be. */
-/** Since we're on the command line, don't trust the PWD! */
-$here = null;
-$self = $_SERVER['SCRIPT_FILENAME'];
+/** Figure out the base directory. */
 $sep = DIRECTORY_SEPARATOR;
-foreach( get_included_files() as $f ) {
-       if( preg_match( "!^(.*)maintenance$sep$self\$!", $f, $matches ) ) {
-               $here = $matches[1];
-       }
-}
-if( is_null( $here ) ) {
-       die( "Couldn't determine current directory.\n" );
-}
+$here = dirname( dirname( __FILE__ ) ) . $sep;
 
 /** where Phpdoc should output documentation */
 #$pdOutput = '/var/www/mwdoc/';
 $pdOutput = "{$here}{$sep}docs{$sep}html";
 
 /** Some more Phpdoc settings */
-$pdOthers = '';
-//$pdOthers = ' -dn \'MediaWiki\' ';
-$pdOthers .= ' --title \'MediaWiki generated documentation\' -o \'HTML:frames:DOM/earthli\' ';
+$pdOthers = ' -dn \'MediaWiki\' ';
+$pdOthers .= ' --title \'MediaWiki generated documentation\' -o \'HTML:frames:DOM/earthli\' --ignore AdminSettings.php,LocalSettings.php,tests/LocalTestSettings.php --parseprivate on ';
 
 /** MediaWiki location */
 #$mwPath = '/var/www/mediawiki/';
@@ -92,7 +81,7 @@ if( is_array( $argv ) && isset( $argv[1] ) ) {
        case '--all':         $input = 0; break;
        case '--includes':    $input = 1; break;
        case '--maintenance': $input = 2; break;
-       case '--skins':       $input = 2; break;
+       case '--skins':       $input = 3; break;
        case '--file':
                $input = 4;
                if( isset( $argv[2] ) ) {