Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix duration of cookies

  • Loading branch information...
commit b8f56c629f5a3fa7a4accdc22b0302b4e6e75927 1 parent 82089d9
Mark Hamstra authored
3  core/components/cookielist/elements/plugins/CookieList.plugin.php
@@ -70,7 +70,8 @@
70 70 $url = $cookielist->url($error);
71 71 // Creates/updates the cookie and its value
72 72 $value = implode(',', $cookieValues);
73   - setcookie($cookieName, $value, 0, '', false, false);
  73 + $duration = time() + $modx->getOption('cookielist.cookie.duration',null,2592000);
  74 + setcookie($cookieName, $value, $duration, '', false, false);
74 75 $modx->sendRedirect($url);
75 76 }
76 77
2  core/components/cookielist/model/cookielist.class.php
@@ -58,7 +58,7 @@ function __construct(modX &$modx,array $config = array()) {
58 58
59 59 $this->modx->lexicon->load('cookielist:default');
60 60
61   - $this->cookiename = $modx->getOption('cookielist.cookie_name') ? $modx->getOption('cookielist.cookie_name') : 'cookieList';
  61 + $this->cookiename = $modx->getOption('cookielist.cookie.name') ? $modx->getOption('cookielist.cookie.name') : 'cookieList';
62 62 }
63 63
64 64 /**

0 comments on commit b8f56c6

Please sign in to comment.
Something went wrong with that request. Please try again.