From: btongminh Date: Sat, 29 Dec 2012 20:39:54 +0000 (+0100) Subject: wfMerge() now works if $wgDiff3 contains spaces X-Git-Tag: 1.31.0-rc.0~21191 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=4f23290816fe41acff23c2b7c46f3b0706c000b9;p=lhc%2Fweb%2Fwiklou.git wfMerge() now works if $wgDiff3 contains spaces Change-Id: Ia18012ee87fe45e292cf08542f5b0680d0b85371 --- diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 6859bdadb1..80be060bcc 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -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. diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 208befe8fa..b06c1b842c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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 = '';