浏览代码

Fix #18922 : multicurrency sync in http with good currencylayer url

Maxime Kohlhaas 3 年之前
父节点
当前提交
77c716565e
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      htdocs/multicurrency/class/multicurrency.class.php

+ 3 - 4
htdocs/multicurrency/class/multicurrency.class.php

@@ -643,13 +643,12 @@ class MultiCurrency extends CommonObject
 
 		include_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
 
-		$urlendpoint = 'http://apilayer.net/api/live?access_key='.$key;
-		//$urlendpoint.='&format=1';
-		$urlendpoint .= (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? '' : '&source='.$conf->global->MULTICURRENCY_APP_SOURCE);
+		$urlendpoint = 'http://api.currencylayer.com/live?access_key='.$key;
+		$urlendpoint .= '&source=' . (empty($conf->global->MULTICURRENCY_APP_SOURCE) ? 'USD' : $conf->global->MULTICURRENCY_APP_SOURCE);
 
 		dol_syslog("Call url endpoint ".$urlendpoint);
 
-		$resget = getURLContent($urlendpoint, 'GET', '', 1, array(), array('http', 'https'), 1);
+		$resget = getURLContent($urlendpoint);
 
 		if ($resget['content']) {
 			$response = $resget['content'];