From: Michael Dale Date: Mon, 27 Jul 2009 00:42:26 +0000 (+0000) Subject: applies patch from bug 19934 X-Git-Tag: 1.31.0-rc.0~40702 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=80a0e63f540d82eda62bdddd72587f0ea904c2ec;p=lhc%2Fweb%2Fwiklou.git applies patch from bug 19934 --- diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index e4c90dc3ef..a87e6f6095 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -195,11 +195,17 @@ class Http { // if status okay process upload using fauxReq to api: if( $status->isOK() ){ // setup the FauxRequest - $fauxReqData = $sd['mParams']; + $fauxReqData = $sd['mParams']; + + // Fix boolean parameters + foreach( $fauxReqData as $k => $v ) { + if( $v === false ) + unset( $fauxReqData[$k] ); + } + $fauxReqData['action'] = 'upload'; $fauxReqData['format'] = 'json'; - $fauxReqData['internalhttpsession'] = $upload_session_key; - + $fauxReqData['internalhttpsession'] = $upload_session_key; // evil but no other clean way about it: $faxReq = new FauxRequest( $fauxReqData, true ); $processor = new ApiMain( $faxReq, $wgEnableWriteAPI );