[-] FO : #PSCFV-3242 - Add PS version in cookie hach name

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16571 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
mDeflotte committed 2012-07-25 15:30:47 +00:00
1 parent f03879cdf2
commit a1d01b0986
1 file changed
+2 -2
+2 -2
View File
@@ -63,7 +63,7 @@ class CookieCore
{ {
$this->_content = array(); $this->_content = array();
$this->_expire = isset($expire) ? (int)($expire) : (time() + 1728000); $this->_expire = isset($expire) ? (int)($expire) : (time() + 1728000);
$this->_name = md5($name); $this->_name = md5(_PS_VERSION_.$name);
$this->_path = trim(Context::getContext()->shop->physical_uri.$path, '/\\').'/'; $this->_path = trim(Context::getContext()->shop->physical_uri.$path, '/\\').'/';
if ($this->_path{0} != '/') $this->_path = '/'.$this->_path; if ($this->_path{0} != '/') $this->_path = '/'.$this->_path;
$this->_path = rawurlencode($this->_path); $this->_path = rawurlencode($this->_path);
@@ -309,7 +309,7 @@ class CookieCore
else else
{ {
$content = 0; $content = 0;
$time = time() - 1; $time = 1;
} }
if (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */ if (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */
return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0); return setcookie($this->_name, $content, $time, $this->_path, $this->_domain, 0);