function __doRequest($request, $location, $action, $version, $one_way = 0)
{
// PHP version < 5.3.3 does not properly append HTTP headers to requests.
if (version_compare(PHP_VERSION, '5.3.3', '<')) {
$oAuth2Info = $this->user->GetOAuth2Info();
$oAuth2Handler = $this->user->GetOAuth2Handler();
if (!empty($oAuth2Info)) {
$oAuth2Info = $oAuth2Handler->GetOrRefreshAccessToken($oAuth2Info);
$this->user->SetOAuth2Info($oAuth2Info);
$oauth2Parameters = $oAuth2Handler->FormatCredentialsForUrl($oAuth2Info);
$location .= '?' . $oauth2Parameters;
}
}
return parent::__doRequest($request, $location, $action, $version);
}