<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
* This class handles HTTP downloads
* want to deal with that so late in the 4.3 dev cycle.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
- * $Id$
- *
+ * @copyright CiviCRM LLC (c) 2004-2015
*/
class CRM_Utils_HttpClient {
protected static $singleton;
/**
- * @var int|NULL seconds; or NULL to use system default
+ * @var int|NULL
+ * seconds; or NULL to use system default
*/
protected $connectionTimeout;
}
/**
- * Send an HTTP GET for a remote resource
+ * Send an HTTP GET for a remote resource.
*
* @param string $remoteFile
* URL of remote file.
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);
}
}
/**
- * Send an HTTP POST for a remote resource
+ * Send an HTTP POST for a remote resource.
*
* @param string $remoteFile
* URL of a .zip file.
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);
}
*/
protected function createCurl($remoteFile) {
$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();