// id_shop on cart product (for links) + change Shop::sqlAsso() + share_order

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7687 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-22 08:57:51 +00:00
parent 9619b93c73
commit e62be3d793
41 changed files with 263 additions and 191 deletions
+4 -4
View File
@@ -212,7 +212,7 @@ class CustomerCore extends ObjectModel
$sql = 'SELECT `id_customer`, `email`, `firstname`, `lastname`
FROM `'._DB_PREFIX_.'customer`
WHERE 1
'.$context->shop->sqlRestriction(true).'
'.$context->shop->sqlRestriction(Shop::SHARE_CUSTOMER).'
ORDER BY `id_customer` ASC';
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
}
@@ -236,7 +236,7 @@ class CustomerCore extends ObjectModel
FROM `'._DB_PREFIX_ .'customer`
WHERE `active` = 1
AND `email` = \''.pSQL($email).'\'
'.$context->shop->sqlRestriction(true).'
'.$context->shop->sqlRestriction(Shop::SHARE_CUSTOMER).'
'.(isset($passwd) ? 'AND `passwd` = \''.md5(_COOKIE_KEY_.$passwd).'\'' : '').'
AND `deleted` = 0
AND `is_guest` = 0';
@@ -291,7 +291,7 @@ class CustomerCore extends ObjectModel
$sql = 'SELECT `id_customer`
FROM `'._DB_PREFIX_.'customer`
WHERE `email` = \''.pSQL($email).'\'
'.$context->shop->sqlRestriction(true).
'.$context->shop->sqlRestriction(Shop::SHARE_CUSTOMER).
($ignoreGuest ? 'AND `is_guest` = 0' : '');
$result = Db::getInstance()->getRow($sql);
@@ -468,7 +468,7 @@ class CustomerCore extends ObjectModel
OR `id_customer` LIKE \'%'.pSQL($query).'%\'
OR `lastname` LIKE \'%'.pSQL($query).'%\'
OR `firstname` LIKE \'%'.pSQL($query).'%\'
)'.$context->shop->sqlRestriction(true);
)'.$context->shop->sqlRestriction(Shop::SHARE_CUSTOMER);
return Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
}