]> git.wh0rd.org Git - tt-rss.git/commitdiff
only use geturl() if in safe mode
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Mar 2013 05:15:59 +0000 (09:15 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 20 Mar 2013 05:15:59 +0000 (09:15 +0400)
include/functions.php

index e66ec0737172272669f5cbe1515dae55f6e1dba3..3b73ed5f71c71d117819f4482dfcdda56632f060 100644 (file)
                global $fetch_last_error;
 
                if (function_exists('curl_init') && !ini_get("open_basedir")) {
-                       //$ch = curl_init($url);
-                       $ch = curl_init(geturl($url));
+
+                       if (ini_get("safe_mode")) {
+                               $ch = curl_init(geturl($url));
+                       } else {
+                               $ch = curl_init($url);
+                       }
 
                        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout ? $timeout : 15);
                        curl_setopt($ch, CURLOPT_TIMEOUT, $timeout ? $timeout : 45);