Respect --quiet in mergeMessageFileList.php
authorTim Starling <tstarling@wikimedia.org>
Thu, 31 Jan 2013 05:35:19 +0000 (16:35 +1100)
committerTim Starling <tstarling@wikimedia.org>
Thu, 31 Jan 2013 05:36:06 +0000 (16:36 +1100)
To go with Ic6db1d8a

Change-Id: I95cbd4c6f47fe741da93c7d3260196cce5f29275

maintenance/mergeMessageFileList.php

index cea6433..dd189f4 100644 (file)
@@ -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" );