// Fix SSL with multishop #PSCFV-2646

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15806 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2012-06-04 08:59:10 +00:00
parent 4f4ac2f26c
commit e01aa221ff
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';