r60368 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60367‎ | r60368 | r60369 >
Date:21:02, 24 December 2009
Author:btongminh
Status:ok
Tags:
Comment:
Follow up to r57868: Fix virus scanner on Windows (r57801 et al)
Modified paths:
  • /trunk/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/upload/UploadBase.php
@@ -791,12 +791,7 @@
792792 #NOTE: there's a 50 line workaround to make stderr redirection work on windows, too.
793793 # that does not seem to be worth the pain.
794794 # Ask me (Duesentrieb) about it if it's ever needed.
795 - $output = array();
796 - if ( wfIsWindows() ) {
797 - exec( "$command", $output, $exitCode );
798 - } else {
799 - exec( "$command 2>&1", $output, $exitCode );
800 - }
 795+ $output = wfShellExec( "$command 2>&1", $exitCode );
801796
802797 # map exit code to AV_xxx constants.
803798 $mappedCode = $exitCode;
@@ -826,7 +821,6 @@
827822 wfDebug( __METHOD__ . ": file passed virus scan.\n" );
828823 return false;
829824 } else {
830 - $output = join( "\n", $output );
831825 $output = trim( $output );
832826
833827 if ( !$output ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57801fix per r57729#c4267dale04:38, 16 October 2009
r57868Rewrote Special:Upload to allow easier extension. Mostly backwards compatible...btongminh19:41, 18 October 2009

Status & tagging log