// Refactoring of shop class with new context

This commit is contained in:
rMalie
2011-07-12 16:28:20 +00:00
parent e7ea230525
commit 2d77925e7d
28 changed files with 216 additions and 185 deletions
+2 -2
View File
@@ -155,8 +155,8 @@ class CustomerCore extends ObjectModel
public function add($autodate = true, $nullValues = true)
{
$this->id_shop = ($this->id_shop) ? $this->id_shop : Shop::getCurrentShop();
$this->id_group_shop = ($this->id_group_shop) ? $this->id_group_shop : Shop::getCurrentGroupShop();
$this->id_shop = ($this->id_shop) ? $this->id_shop : Context::getContext()->shop->getID();
$this->id_group_shop = ($this->id_group_shop) ? $this->id_group_shop : Context::getContext()->shop->getGroupID();
$this->birthday = (empty($this->years) ? $this->birthday : (int)($this->years).'-'.(int)($this->months).'-'.(int)($this->days));
$this->secure_key = md5(uniqid(rand(), true));
$this->last_passwd_gen = date('Y-m-d H:i:s', strtotime('-'.Configuration::get('PS_PASSWD_TIME_FRONT').'minutes'));