Index: trunk/phase3/maintenance/minify.php |
— | — | @@ -48,13 +48,12 @@ |
49 | 49 | $inDir = dirname( $inPath ); |
50 | 50 | |
51 | 51 | if ( strpos( $inName, '.min.' ) !== false ) { |
52 | | - echo "Skipping $inName\n"; |
| 52 | + $this->error( "Skipping $inName\n" ); |
53 | 53 | continue; |
54 | 54 | } |
55 | 55 | |
56 | 56 | if ( !file_exists( $inPath ) ) { |
57 | | - $this->error( "File does not exist: $arg" ); |
58 | | - exit( 1 ); |
| 57 | + $this->error( "File does not exist: $arg", true ); |
59 | 58 | } |
60 | 59 | |
61 | 60 | $extension = $this->getExtension( $inName ); |
— | — | @@ -80,7 +79,7 @@ |
81 | 80 | |
82 | 81 | public function minify( $inPath, $outPath ) { |
83 | 82 | $extension = $this->getExtension( $inPath ); |
84 | | - echo basename( $inPath ) . ' -> ' . basename( $outPath ) . '...'; |
| 83 | + $this->output( basename( $inPath ) . ' -> ' . basename( $outPath ) . '...' ); |
85 | 84 | |
86 | 85 | $inText = file_get_contents( $inPath ); |
87 | 86 | if ( $inText === false ) { |
— | — | @@ -103,7 +102,7 @@ |
104 | 103 | |
105 | 104 | fwrite( $outFile, $outText ); |
106 | 105 | fclose( $outFile ); |
107 | | - echo " ok\n"; |
| 106 | + $this->output( " ok\n" ); |
108 | 107 | } |
109 | 108 | } |
110 | 109 | |