getBools doesn't exist in Translate anymore
[lhc/web/wiklou.git] / maintenance / mergeMessageFileList.php
index 8107016..62596b2 100644 (file)
@@ -25,7 +25,7 @@
 # Start from scratch
 define( 'MW_NO_EXTENSION_MESSAGES', 1 );
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 $maintClass = 'MergeMessageFileList';
 $mmfl = false;
 
@@ -82,6 +82,9 @@ class MergeMessageFileList extends Maintenance {
                if ( $this->hasOption( 'output' ) ) {
                        $mmfl['output'] = $this->getOption( 'output' );
                }
+               if ( $this->hasOption( 'quiet' ) ) {
+                       $mmfl['quiet'] = true;
+               }
        }
 }
 
@@ -92,7 +95,9 @@ foreach ( $mmfl['setupFiles'] as $fileName ) {
                continue;
        }
        $fileName = str_replace( '$IP', $IP, $fileName );
-       fwrite( STDERR, "Loading data from $fileName\n" );
+       if ( empty( $mmfl['quiet'] ) ) {
+               fwrite( STDERR, "Loading data from $fileName\n" );
+       }
        include_once( $fileName );
 }
 fwrite( STDERR, "\n" );
@@ -104,7 +109,7 @@ $s =
 
 $dirs = array(
        $IP,
-       dirname( dirname( __FILE__ ) ),
+       dirname( __DIR__ ),
        realpath( $IP )
 );
 
@@ -120,4 +125,3 @@ if ( isset( $mmfl['output'] ) ) {
 } else {
        echo $s;
 }
-