Index: trunk/extensions/Score/Score.body.php |
— | — | @@ -215,9 +215,7 @@ |
216 | 216 | } |
217 | 217 | |
218 | 218 | /* Midi rendering? */ |
219 | | - if ( $options['vorbis'] ) { |
220 | | - $options['midi'] = true; |
221 | | - } elseif ( array_key_exists( 'midi', $args ) ) { |
| 219 | + if ( array_key_exists( 'midi', $args ) ) { |
222 | 220 | $options['midi'] = $args['midi']; |
223 | 221 | } else { |
224 | 222 | $options['midi'] = false; |
— | — | @@ -288,7 +286,8 @@ |
289 | 287 | |
290 | 288 | try { |
291 | 289 | /* Generate PNG and MIDI files if necessary */ |
292 | | - if ( ( !file_exists( $image ) && !file_exists( $multi1 ) ) || ( $options['midi'] && !file_exists( $midi ) ) ) { |
| 290 | + if ( ( !file_exists( $image ) && !file_exists( $multi1 ) ) |
| 291 | + || ( ( $options['midi'] || $options['vorbis'] ) && !file_exists( $midi ) ) ) { |
293 | 292 | self::generatePngAndMidi( $code, $options, $filePrefix, $factoryDirectory ); |
294 | 293 | } |
295 | 294 | |
— | — | @@ -431,7 +430,7 @@ |
432 | 431 | if ( $rc2 != 0 ) { |
433 | 432 | self::throwCallException( wfMessage( 'score-compilererr' ), $output ); |
434 | 433 | } |
435 | | - if ( $options['midi'] && !file_exists( $factoryMidi ) ) { |
| 434 | + if ( ( $options['midi'] || $options['vorbis'] ) && !file_exists( $factoryMidi ) ) { |
436 | 435 | throw new ScoreException( wfMessage( 'score-nomidi' ) ); |
437 | 436 | } |
438 | 437 | |
— | — | @@ -494,7 +493,7 @@ |
495 | 494 | . "\\score {\n" |
496 | 495 | . $lilypondCode |
497 | 496 | . "\t\\layout { }\n" |
498 | | - . ( $options['midi'] ? "\t\\midi { }\n" : "" ) |
| 497 | + . ( ( $options['midi'] || $options['vorbis'] ) ? "\t\\midi { }\n" : "" ) |
499 | 498 | . "}\n"; |
500 | 499 | return $raw; |
501 | 500 | } |