[-] CORE : Merge of https://github.com/PrestaShop/PrestaShop/pull/816
This commit is contained in:
1 parent
5f5b9bd1de
commit
10dac5a45b
2 files changed
+9
-2
No files matched your search
+5
-1
@@ -152,7 +152,11 @@ class CartCore extends ObjectModel
|
|||||||
|
|
||||||
public function __construct($id = null, $id_lang = null)
|
public function __construct($id = null, $id_lang = null)
|
||||||
{
|
{
|
||||||
parent::__construct($id, $id_lang);
|
parent::__construct($id);
|
||||||
|
|
||||||
|
if (!is_null($id_lang))
|
||||||
|
$this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
|
||||||
|
|
||||||
if ($this->id_customer)
|
if ($this->id_customer)
|
||||||
{
|
{
|
||||||
if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer)
|
if (isset(Context::getContext()->customer) && Context::getContext()->customer->id == $this->id_customer)
|
||||||
|
|||||||
@@ -122,7 +122,10 @@ class EmployeeCore extends ObjectModel
|
|||||||
|
|
||||||
public function __construct($id = null, $id_lang = null, $id_shop = null)
|
public function __construct($id = null, $id_lang = null, $id_shop = null)
|
||||||
{
|
{
|
||||||
parent::__construct($id, $id_lang, $id_shop);
|
parent::__construct($id, null, $id_shop);
|
||||||
|
|
||||||
|
if (!is_null($id_lang))
|
||||||
|
$this->id_lang = (int)(Language::getLanguage($id_lang) !== false) ? $id_lang : Configuration::get('PS_LANG_DEFAULT');
|
||||||
|
|
||||||
if ($this->id)
|
if ($this->id)
|
||||||
$this->associated_shops = $this->getAssociatedShops();
|
$this->associated_shops = $this->getAssociatedShops();
|
||||||
|
|||||||
Reference in new issue
Block a user