Skip to content

Commit

Permalink
adds cainfo php.ini option and improves debugability
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Jan 8, 2016
1 parent cf393a3 commit 3f68dd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/ApiPush.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,12 @@ protected function doLogin( $user, $password, $domain, $target, $token = null, $
if ( !is_null( $token ) ) {
$requestData['lgtoken'] = $token;
}

$req = PushFunctions::getHttpRequest( $target,
array(
'postData' => $requestData,
'method' => 'POST',
'timeout' => 'default'
'timeout' => 'default',
'caInfo' => ini_get('curl.cainfo')
)
);

Expand Down
3 changes: 2 additions & 1 deletion includes/Push_Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,11 @@ public static function flipKeys( array &$arr, $id ) {
* @return (MW)HttpRequest
*/
public static function getHttpRequest( $target, $args ) {
return call_user_func_array(
$req=call_user_func_array(
array( ( class_exists( 'MWHttpRequest' ) ? 'MWHttpRequest' : 'HttpRequest' ), 'factory' ),
array( $target, $args )
);
return $req;
}

}

0 comments on commit 3f68dd3

Please sign in to comment.