diff --git a/core/toxid_curl_oxseodecoder.php b/core/toxid_curl_oxseodecoder.php index 7d79bbf..6a0c4d8 100644 --- a/core/toxid_curl_oxseodecoder.php +++ b/core/toxid_curl_oxseodecoder.php @@ -87,7 +87,7 @@ private function isToxidUrl($sSeoUrl) $decodedToxidUrl = $this->detectToxidAndLang($sSeoUrl); if (false !== $decodedToxidUrl) { $this->decodedUrl['toxidUrl'] = $decodedToxidUrl['url']; - $languageId = oxRegistry::getLang()->getBaseLanguage(); + $languageId = $decodedToxidUrl['lang']; $this->decodedUrl['toxidLang'] = $this->processToxidLangByUrl($languageId, $this->decodedUrl['toxidUrl']); return true; diff --git a/core/toxidcurl.php b/core/toxidcurl.php index 2f65ae2..0455e1f 100644 --- a/core/toxidcurl.php +++ b/core/toxidcurl.php @@ -305,6 +305,9 @@ protected function _getXmlObject($blReset = false) */ protected function _getSnippetFromXml($sSnippet) { + if(str_replace("/","",$this->_getToxidLangSource()) == '') + return ''; + $oTypo3Xml = $this->_getXmlObject(); $aXpathSnippets = $oTypo3Xml->xpath('//' . $sSnippet . '[1]'); $sText = $aXpathSnippets[0]; @@ -387,6 +390,12 @@ protected function _getRemoteContent($sUrl) curl_setopt($curl_handle, CURLOPT_URL, $sUrl); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); + + if ($this->getConfig()->getActiveShop()->getFieldData('OXPRODUCTIVE') == 0) { + curl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($curl_handle, CURLOPT_SSL_VERIFYHOST, false); + } + if (!$this->isToxidCurlPage()) { curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true); } @@ -433,6 +442,10 @@ protected function _rewriteUrls($sContent, $iLangId = null, $blMultiLang = false foreach ($aLanguages as $iLangId) { $sShopUrl = $this->getConfig()->getShopUrl(); + $oConf = $this->getConfig(); + if ($oConf->isSsl()) { + $sShopUrl = str_replace('http:','https:',$sShopUrl); + } if (substr($sShopUrl, -1) !== '/') { $sShopUrl = $sShopUrl . '/'; @@ -485,12 +498,22 @@ protected function _rewriteUrls($sContent, $iLangId = null, $blMultiLang = false */ protected function _getToxidLangSource($iLangId = null, $blReset = false) { - if ($this->_aSourceUrlByLang === null || $blReset) { - $this->_aSourceUrlByLang = $this->getConfig()->getConfigParam('aToxidCurlSource'); - } if ($iLangId === null) { $iLangId = oxRegistry::getLang()->getBaseLanguage(); } + + if ($this->_aSourceUrlByLang === null || $blReset) { + + $oConf = $this->getConfig(); + if ($oConf->isSsl() && $this->getConfig()->getConfigParam('aToxidCurlSourceSsl')[$iLangId]!="") { + $this->_aSourceUrlByLang = $this->getConfig()->getConfigParam('aToxidCurlSourceSsl'); + } else { + $this->_aSourceUrlByLang = $this->getConfig()->getConfigParam('aToxidCurlSource'); + } + + + } + $source = $this->_aSourceUrlByLang[$iLangId]; if (substr($source, -1) !== '/') {