Permalink
Browse files

Fix duration of cookies

  • Loading branch information...
1 parent 82089d9 commit b8f56c629f5a3fa7a4accdc22b0302b4e6e75927 @Mark-H committed Nov 18, 2011
View
3 core/components/cookielist/elements/plugins/CookieList.plugin.php
@@ -70,7 +70,8 @@
$url = $cookielist->url($error);
// Creates/updates the cookie and its value
$value = implode(',', $cookieValues);
- setcookie($cookieName, $value, 0, '', false, false);
+ $duration = time() + $modx->getOption('cookielist.cookie.duration',null,2592000);
+ setcookie($cookieName, $value, $duration, '', false, false);
$modx->sendRedirect($url);
}
View
2 core/components/cookielist/model/cookielist.class.php
@@ -58,7 +58,7 @@ function __construct(modX &$modx,array $config = array()) {
$this->modx->lexicon->load('cookielist:default');
- $this->cookiename = $modx->getOption('cookielist.cookie_name') ? $modx->getOption('cookielist.cookie_name') : 'cookieList';
+ $this->cookiename = $modx->getOption('cookielist.cookie.name') ? $modx->getOption('cookielist.cookie.name') : 'cookieList';
}
/**

0 comments on commit b8f56c6

Please sign in to comment.