1
0
mirror of synced 2024-11-21 21:06: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;
}
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)) {
$ch = curl_init();
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_HEADER, true); // headers
curl_exec($ch);