From: Janusz Dobrowolski Date: Mon, 20 May 2013 12:41:52 +0000 (+0200) Subject: Fixing cookie.txt location during access to remote exchange rate server. X-Git-Tag: 2.3-final~240 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=44e36eb0e20bd9ee990fb0b46f89bd208e2adb96;p=fa-stable.git Fixing cookie.txt location during access to remote exchange rate server. --- diff --git a/gl/includes/db/gl_db_rates.inc b/gl/includes/db/gl_db_rates.inc index 9f0f101d..f3237d55 100644 --- a/gl/includes/db/gl_db_rates.inc +++ b/gl/includes/db/gl_db_rates.inc @@ -88,6 +88,8 @@ function retrieve_exrate($curr_b, $date) function get_extern_rate($curr_b, $provider = 'ECB', $date) { + global $path_to_root; + $curr_a = get_company_pref('curr_default'); if ($provider == 'ECB') { @@ -118,7 +120,7 @@ function get_extern_rate($curr_b, $provider = 'ECB', $date) do { $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, 'http://'.$site.$filename); - curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt"); + curl_setopt ($ch, CURLOPT_COOKIEJAR, "$path_to_root/tmp/cookie.txt"); curl_setopt ($ch, CURLOPT_HEADER, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); // prevent warning while save_mode/open_basedir on (redireciton doesn't occur at least on ECB page)