Merge branch 'sprint/174_tianshujie_bug' into 'master'
* Fix the problem of recording product cookies. See merge request easycorp/zentaopms!719
This commit is contained in:
@@ -155,10 +155,10 @@ class productModel extends model
|
||||
if(empty($product)) $productID = key($products);
|
||||
$this->session->set('product', (int)$productID, $this->app->tab);
|
||||
if($productID && strpos(",{$this->app->user->view->products},", ",{$productID},") === false) $this->accessDenied();
|
||||
|
||||
setcookie('preProductID', $productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
}
|
||||
|
||||
setcookie('preProductID', (int)$productID, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
|
||||
if($this->cookie->preProductID != $this->session->product)
|
||||
{
|
||||
setcookie('preBranch', 0, $this->config->cookieLife, $this->config->webRoot, '', $this->config->cookieSecure, true);
|
||||
|
||||
Reference in New Issue
Block a user