Index: trunk/phase3/includes/Math.php |
— | — | @@ -57,15 +57,16 @@ |
58 | 58 | if( function_exists( 'is_executable' ) && !is_executable( $wgTexvc ) ) { |
59 | 59 | return $this->_error( 'math_notexvc' ); |
60 | 60 | } |
61 | | - $cmd = $wgTexvc . ' ' . |
62 | | - wfEscapeShellArg( $wgTmpDirectory ).' '. |
63 | | - wfEscapeShellArg( $wgTmpDirectory ).' '. |
64 | | - wfEscapeShellArg( $this->tex ).' '. |
| 61 | + $delim = wfIsWindows() ? "' '" : ' '; |
| 62 | + $cmd = wfEscapeShellArg( $wgTexvc ) . $delim . |
| 63 | + wfEscapeShellArg( $wgTmpDirectory ) . $delim . |
| 64 | + wfEscapeShellArg( $wgTmpDirectory ) . $delim . |
| 65 | + wfEscapeShellArg( $this->tex ) . $delim . |
65 | 66 | wfEscapeShellArg( $wgInputEncoding ); |
66 | 67 | |
67 | 68 | if ( wfIsWindows() ) { |
68 | 69 | # Invoke it within cygwin sh, because texvc expects sh features in its default shell |
69 | | - $cmd = 'sh -c ' . wfEscapeShellArg( $cmd ); |
| 70 | + $cmd = "sh -c $cmd"; |
70 | 71 | } |
71 | 72 | |
72 | 73 | wfDebug( "TeX: $cmd\n" ); |