1
0
mirror of synced 2024-11-25 14:56:09 +03:00

multiple site fix

This commit is contained in:
Grigory Pomadchin 2014-11-27 18:58:34 +03:00
parent fa612ab5a4
commit 56b70beb36

View File

@ -1096,10 +1096,19 @@ class ICrmOrderActions
break; break;
} }
if(!empty($defaultSite)) {
$serverName = $defaultSite['SERVER_NAME'];
} else {
if(isset($_SERVER['SERVER_NAME']) && $_SERVER['SERVER_NAME'])
$serverName = $_SERVER['SERVER_NAME'];
else
$serverName = '';
}
if(self::isForkable($defaultSite)) { if(self::isForkable($defaultSite)) {
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . curl_setopt($ch, CURLOPT_URL, ($_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') .
$_SERVER['SERVER_NAME'] . '/retailcrm/agent.php'); $serverName . '/retailcrm/agent.php');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
//curl_setopt($ch,CURLOPT_HEADER, true); // headers //curl_setopt($ch,CURLOPT_HEADER, true); // headers
curl_exec($ch); curl_exec($ch);