// Fix SSL with multishop #PSCFV-2646

This commit is contained in:
rMalie
2012-06-04 08:59:10 +00:00
parent 005a34d204
commit 65d4d2b36e
2 changed files with 26 additions and 25 deletions
+2 -1
View File
@@ -285,10 +285,11 @@ class ShopCore extends ObjectModel
// Find current shop from URL
if (!($id_shop = Tools::getValue('id_shop')) || defined('_PS_ADMIN_DIR_'))
{
$host = pSQL(Tools::getHttpHost());
$sql = 'SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
FROM '._DB_PREFIX_.'shop_url su
LEFT JOIN '._DB_PREFIX_.'shop s ON (s.id_shop = su.id_shop)
WHERE su.domain = \''.pSQL(Tools::getHttpHost()).'\'
WHERE (su.domain = \''.$host.'\' OR su.domain_ssl = \''.$host.'\')
AND s.active = 1
AND s.deleted = 0
ORDER BY LENGTH(uri) DESC';