Merge pull request #4352 from colemanw/CRM-15450
[civicrm-core.git] / CRM / Utils / HttpClient.php
index b7dd02d2f5c6e320f096c0ba9d501a7476c93790..dc88f47559b7b8f58b972092bc9dd4f52e2007b2 100644 (file)
@@ -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,7 +151,9 @@ class CRM_Utils_HttpClient {
    * Send an HTTP POST for a remote resource
    *
    * @param string $remoteFile URL of a .zip file
-   * @param string $localFile path at which to store the .zip file
+   * @param $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) {
@@ -205,8 +213,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);
   }
 
 }