r56731 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56730‎ | r56731 | r56732 >
Date:19:50, 21 September 2009
Author:demon
Status:resolved (Comments)
Tags:
Comment:
(bug 20353) wfShellExec() malfunctioning on NT builds 6002 and above. Patch by Jimmy Xu.
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -74,6 +74,7 @@
7575 * Happy-melon
7676 * Jeremy Baron
7777 * Jidanni
 78+* Jimmy Xu
7879 * Juliano F. Ravasi
7980 * Karun Dambiec
8081 * Lucas Garczewski
Index: trunk/phase3/includes/GlobalFunctions.php
@@ -2326,10 +2326,10 @@
23272327 $cmd = escapeshellarg( $script ) . " $time $mem $filesize " . escapeshellarg( $cmd );
23282328 }
23292329 }
2330 - } elseif ( php_uname( 's' ) == 'Windows NT' ) {
 2330+ } elseif ( php_uname( 's' ) == 'Windows NT' && substr( php_uname( 'v' ), 6, 4 ) <= 6001 ) {
23312331 # This is a hack to work around PHP's flawed invocation of cmd.exe
23322332 # http://news.php.net/php.internals/21796
2333 - $cmd = '"' . $cmd . '"'; // FIXME: breaking Vista sp2/PHP 5.2.9(2)
 2333+ $cmd = '"' . $cmd . '"';
23342334 }
23352335 wfDebug( "wfShellExec: $cmd\n" );
23362336
Index: trunk/phase3/RELEASE-NOTES
@@ -525,6 +525,8 @@
526526 returns false if the page doesn't exist
527527 * (bug 20751) ForeignApiRepo now urldecodes filenames when saving to local cache
528528 * (bug 20730) Fix to Special:Version ViewVC link for branch checkouts
 529+* (bug 20353) wfShellExec() was adding extra quotes on Windows Vista, causing
 530+ command line scripts to fail
529531
530532 == API changes in 1.16 ==
531533

Follow-up revisions

RevisionCommit summaryAuthorDate
r57093Followup r56731, check for PHP 5.3 or greater (where it was fixed). Not a Win...demon00:38, 30 September 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   23:36, 29 September 2009

This doesn't really seem to make sense... can someone clarify exactly where this double-quoted command line comes from?

#Comment by Brion VIBBER (talk | contribs)   00:51, 30 September 2009

We did some digging and confirmed that it's a change in PHP 5.3's behavior on Windows, rather than the version of Windows. Condition check fixed in r57093.

Status & tagging log