r40956 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40955‎ | r40956 | r40957 >
Date:12:36, 17 September 2008
Author:aaron
Status:ok
Tags:
Comment:
Bah, revert to r40753
Modified paths:
  • /trunk/phase3/includes/Math.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Math.php
@@ -57,16 +57,15 @@
5858 if( function_exists( 'is_executable' ) && !is_executable( $wgTexvc ) ) {
5959 return $this->_error( 'math_notexvc' );
6060 }
61 - $delim = wfIsWindows() ? "' '" : ' ';
62 - $cmd = wfEscapeShellArg( $wgTexvc ) . $delim .
63 - wfEscapeShellArg( $wgTmpDirectory ) . $delim .
64 - wfEscapeShellArg( $wgTmpDirectory ) . $delim .
65 - wfEscapeShellArg( $this->tex ) . $delim .
66 - wfEscapeShellArg( $wgInputEncoding );
 61+ $cmd = $wgTexvc . ' ' .
 62+ escapeshellarg( $wgTmpDirectory ).' '.
 63+ escapeshellarg( $wgTmpDirectory ).' '.
 64+ escapeshellarg( $this->tex ).' '.
 65+ escapeshellarg( $wgInputEncoding );
6766
6867 if ( wfIsWindows() ) {
6968 # Invoke it within cygwin sh, because texvc expects sh features in its default shell
70 - $cmd = "sh -c $cmd";
 69+ $cmd = 'sh -c ' . wfEscapeShellArg( $cmd );
7170 }
7271
7372 wfDebug( "TeX: $cmd\n" );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40753Use wfEscapeShellArg() since it works on windows (bug 13518)aaron15:10, 12 September 2008

Status & tagging log