From 45662c78edb27329aeee7d6892d408141ed5596d Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Fri, 14 Feb 2014 18:51:19 +0300 Subject: [PATCH] https in urls in ICML --- intaro.intarocrm/classes/general/ICMLLoader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intaro.intarocrm/classes/general/ICMLLoader.php b/intaro.intarocrm/classes/general/ICMLLoader.php index 29cf1014..e95985e2 100644 --- a/intaro.intarocrm/classes/general/ICMLLoader.php +++ b/intaro.intarocrm/classes/general/ICMLLoader.php @@ -317,7 +317,7 @@ class ICMLLoader { while($file = $dbFiles->GetNext()) { // Link picture to product - $products[$pictures[$file['ID']]]['PICTURE'] = "http://" . + $products[$pictures[$file['ID']]]['PICTURE'] = ($_SERVER["HTTPS"] == 'on' ? "https://" : "http://") . $_SERVER['SERVER_NAME'] . '/upload/' . $file['SUBDIR'] . '/' . $file['FILE_NAME'] ; @@ -513,7 +513,7 @@ class ICMLLoader { } $offer .= "" . $this->PrepareValue($arOffer["PICTURE"]) . "\n"; - $offer .= "http://" . $_SERVER['SERVER_NAME'] . $this->PrepareValue($arOffer['DETAIL_PAGE_URL']) . "\n"; + $offer .= "" . ($_SERVER["HTTPS"] == 'on' ? "https://" : "http://") . $_SERVER['SERVER_NAME'] . $this->PrepareValue($arOffer['DETAIL_PAGE_URL']) . "\n"; $offer .= "" . $this->PrepareValue($arOffer['PRICE']) . "\n"; foreach ($categories as $category) @@ -545,4 +545,4 @@ class ICMLLoader { return $offer; } -} \ No newline at end of file +}