X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FHttpClient.php;h=92aed3c84245229ca9a89dd75d5f6ca20357b3eb;hb=50bfb46054c0ccd0f836a569c5417969da3c1a53;hp=29b27a9ea77b154dc2260c5c26259d2bc5e702db;hpb=bfc6355af6949ca1e4a7c39d0f54f0ec70b641bf;p=civicrm-core.git diff --git a/CRM/Utils/HttpClient.php b/CRM/Utils/HttpClient.php index 29b27a9ea7..92aed3c842 100644 --- a/CRM/Utils/HttpClient.php +++ b/CRM/Utils/HttpClient.php @@ -1,9 +1,9 @@ createCurl($remoteFile); if (preg_match('/^https:/', $remoteFile) && !$caConfig->isEnableSSL()) { - //CRM_Core_Error::fatal('Cannot install this extension - does not support SSL'); + // CRM_Core_Error::fatal('Cannot install this extension - does not support SSL'); return array(self::STATUS_DL_ERROR, NULL); } @@ -152,7 +151,7 @@ class CRM_Utils_HttpClient { } /** - * Send an HTTP POST for a remote resource + * Send an HTTP POST for a remote resource. * * @param string $remoteFile * URL of a .zip file. @@ -171,7 +170,7 @@ class CRM_Utils_HttpClient { list($ch, $caConfig) = $this->createCurl($remoteFile); if (preg_match('/^https:/', $remoteFile) && !$caConfig->isEnableSSL()) { - //CRM_Core_Error::fatal('Cannot install this extension - does not support SSL'); + // CRM_Core_Error::fatal('Cannot install this extension - does not support SSL'); return array(self::STATUS_DL_ERROR, NULL); } @@ -196,9 +195,8 @@ class CRM_Utils_HttpClient { * (0 => resource, 1 => CA_Config_Curl) */ protected function createCurl($remoteFile) { - require_once 'CA/Config/Curl.php'; $caConfig = CA_Config_Curl::probe(array( - 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, TRUE), + 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'), )); $ch = curl_init();