X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FHttpClient.php;h=e9abf8e7e589c1c7ccea747853b4d1755c6f04d9;hb=100fef9d739cd6f5377269d230510c328e484c8c;hp=a3252a27c0c05996b1a3815a7a7a2741cdbe8a13;hpb=03c24df0b528f700e6765cc18a2c14d4d70e4bdf;p=civicrm-core.git diff --git a/CRM/Utils/HttpClient.php b/CRM/Utils/HttpClient.php index a3252a27c0..e9abf8e7e5 100644 --- a/CRM/Utils/HttpClient.php +++ b/CRM/Utils/HttpClient.php @@ -54,6 +54,9 @@ class CRM_Utils_HttpClient { */ protected $connectionTimeout; + /** + * @return CRM_Utils_HttpClient + */ public static function singleton() { if (!self::$singleton) { self::$singleton = new CRM_Utils_HttpClient(); @@ -61,6 +64,9 @@ class CRM_Utils_HttpClient { return self::$singleton; } + /** + * @param null $connectionTimeout + */ public function __construct($connectionTimeout = NULL) { $this->connectionTimeout = $connectionTimeout; } @@ -145,9 +151,8 @@ class CRM_Utils_HttpClient { * Send an HTTP POST for a remote resource * * @param string $remoteFile URL of a .zip file - * @param $params + * @param array $params * - * @internal param string $localFile path at which to store the .zip file * @return array array(0 => STATUS_OK|STATUS_DL_ERROR, 1 => string) */ public function post($remoteFile, $params) { @@ -207,8 +212,11 @@ class CRM_Utils_HttpClient { return array($ch, $caConfig); } + /** + * @return bool + */ public function isRedirectSupported() { - return (ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') === FALSE); + return (ini_get('open_basedir') == '') && (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') == '' || ini_get('safe_mode') === FALSE); } }