diff options
author | Andrew Dolgov <[email protected]> | 2013-03-20 09:15:59 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-20 09:15:59 +0400 |
commit | b799dc8b0d540d671a7f9c4f1202d428692367c9 (patch) | |
tree | ff1405be24253f5b0a3a235d78f8d93d28052952 /include/functions.php | |
parent | 911845b5e7f6c3ebc59f6fdc3d800414fcb45c8d (diff) |
only use geturl() if in safe mode
Diffstat (limited to 'include/functions.php')
-rw-r--r-- | include/functions.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/functions.php b/include/functions.php index e66ec0737..3b73ed5f7 100644 --- a/include/functions.php +++ b/include/functions.php @@ -286,8 +286,12 @@ 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); |