wfMerge() now works if $wgDiff3 contains spaces
authorbtongminh <bryan.tongminh@gmail.com>
Sat, 29 Dec 2012 20:39:54 +0000 (21:39 +0100)
committerbtongminh <bryan.tongminh@gmail.com>
Sat, 29 Dec 2012 20:39:54 +0000 (21:39 +0100)
Change-Id: Ia18012ee87fe45e292cf08542f5b0680d0b85371

RELEASE-NOTES-1.21
includes/GlobalFunctions.php

index 6859bda..80be060 100644 (file)
@@ -127,6 +127,7 @@ production.
 * (bug 41733) Hide "New user message" (.usermessage) element from printable view.
 * (bug 39062) Special:Contributions will display changes that don't have
   a parent id instead of just an empty bullet item.
+* wfMerge() now works if $wgDiff3 contains spaces
 
 === API changes in 1.21 ===
 * prop=revisions can now report the contentmodel and contentformat.
index 208befe..b06c1b8 100644 (file)
@@ -2936,7 +2936,7 @@ function wfMerge( $old, $mine, $yours, &$result ) {
        fclose( $yourtextFile );
 
        # Check for a conflict
-       $cmd = $wgDiff3 . ' -a --overlap-only ' .
+       $cmd = wfEscapeShellArg( $wgDiff3 ) . ' -a --overlap-only ' .
                wfEscapeShellArg( $mytextName ) . ' ' .
                wfEscapeShellArg( $oldtextName ) . ' ' .
                wfEscapeShellArg( $yourtextName );
@@ -2950,7 +2950,7 @@ function wfMerge( $old, $mine, $yours, &$result ) {
        pclose( $handle );
 
        # Merge differences
-       $cmd = $wgDiff3 . ' -a -e --merge ' .
+       $cmd = wfEscapeShellArg( $wgDiff3 ) . ' -a -e --merge ' .
                wfEscapeShellArg( $mytextName, $oldtextName, $yourtextName );
        $handle = popen( $cmd, 'r' );
        $result = '';