Index: trunk/extensions/Score/README |
— | — | @@ -28,9 +28,14 @@ |
29 | 29 | $wgLilyPond = '/path/to/your/lilypond/executable'; /* required */ |
30 | 30 | $wgScoreTrim = true; /* Set to false if you don't want score trimming */ |
31 | 31 | |
32 | | - to your LocalSettings.php file. |
| 32 | + to your LocalSettings.php file. If you get unexpected out-of-memory errors, |
| 33 | + you may also have to increase $wgMaxShellMemory (see |
33 | 34 | |
| 35 | + https://www.mediawiki.org/wiki/Manual:$wgMaxShellMemory |
34 | 36 | |
| 37 | + for more information. |
| 38 | + |
| 39 | + |
35 | 40 | Usage |
36 | 41 | ===== |
37 | 42 | |
Index: trunk/extensions/Score/Score.body.php |
— | — | @@ -194,10 +194,10 @@ |
195 | 195 | if ( !is_executable( $wgLilyPond ) ) { |
196 | 196 | throw new ScoreException( 'score-notexecutable' ); |
197 | 197 | } |
198 | | - $cmd = $wgLilyPond |
| 198 | + $cmd = wfEscapeShellArg( $wgLilyPond ) |
199 | 199 | . " -dsafe='#t' -dbackend=eps --png --header=texidoc " |
200 | 200 | . wfEscapeShellArg( $lilypondFile ) |
201 | | - . " 2>&1"; // FIXME: This last bit is probably not portable |
| 201 | + . ' 2>&1'; // FIXME: This last bit is probably not portable |
202 | 202 | $output = wfShellExec( $cmd, $rc2 ); |
203 | 203 | $rc = chdir( $oldcwd ); |
204 | 204 | if ( !$rc ) { |
— | — | @@ -314,7 +314,8 @@ |
315 | 315 | private static function trimImage( $source, $dest ) { |
316 | 316 | global $wgImageMagickConvertCommand; |
317 | 317 | |
318 | | - $cmd = "$wgImageMagickConvertCommand -trim " |
| 318 | + $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) |
| 319 | + . ' -trim ' |
319 | 320 | . wfEscapeShellArg( $source ) . ' ' |
320 | 321 | . wfEscapeShellArg( $dest ); |
321 | 322 | wfShellExec( $cmd, $rc ); |