]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
drop support for (obsolete, removed from recent php versions) php safe_mode setting
[tt-rss.git] / include / functions.php
old mode 100644 (file)
new mode 100755 (executable)
index 92d6e97..8d1c2a6
 
                        $fetch_curl_used = true;
 
-                       if (ini_get("safe_mode") || ini_get("open_basedir") || defined("FORCE_GETURL")) {
-                               $new_url = geturl($url);
-                               if (!$new_url) {
-                                   // geturl has already populated $fetch_last_error
-                                   return false;
-                               }
-                               $ch = curl_init($new_url);
-                       } else {
-                               $ch = curl_init($url);
-                       }
+                       $ch = curl_init($url);
 
                        if ($timestamp && !$post_query) {
                                curl_setopt($ch, CURLOPT_HTTPHEADER,
 
                        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout ? $timeout : FILE_FETCH_CONNECT_TIMEOUT);
                        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout ? $timeout : FILE_FETCH_TIMEOUT);
-                       curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("safe_mode") && !ini_get("open_basedir"));
+                       curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("open_basedir"));
                        curl_setopt($ch, CURLOPT_MAXREDIRS, 20);
                        curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
                        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                        curl_setopt($ch, CURLOPT_ENCODING, "");
                        //curl_setopt($ch, CURLOPT_REFERER, $url);
 
-                       if (!ini_get("safe_mode") && !ini_get("open_basedir")) {
+                       if (!ini_get("open_basedir")) {
                                curl_setopt($ch, CURLOPT_COOKIEJAR, "/dev/null");
                        }