Skip to content

Commit

Permalink
#14: Correctly match parentheses
Browse files Browse the repository at this point in the history
Update the class-file and readme to reflect the required changes.
  • Loading branch information
lat9 committed Jan 1, 2018
1 parent 994814e commit 6a5a416
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions includes/classes/observers/class.remember_me_observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Part of the "Remember Me" plugin, modified for operation under Zen Cart v1.5.5 and later
// by Cindy Merkin (aka lat9) of Vinos de Frutas Tropicales (vinosdefrutastropicales.com).
//
// Version: 1.4.5, 2017-12-28
// Version: 1.4.6, 2018-01-01
//
// Copyright (C) 2014-2017, Vinos de Frutas Tropicales
// Copyright (C) 2014-2018, Vinos de Frutas Tropicales
//
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
Expand All @@ -23,7 +23,7 @@ class remember_me_observer extends base

public function __construct()
{
$this->enabled = (defined('PERMANENT_LOGIN') && PERMANENT_LOGIN == 'true') && !isset($_SESSION['COWOA'] && !isset($_SESSION['is_guest_checkout']));
$this->enabled = ((defined('PERMANENT_LOGIN') && PERMANENT_LOGIN == 'true') && !isset($_SESSION['COWOA']) && !(function_exists('zen_in_guest_checkout') && zen_in_guest_checkout()));
$this->secret = (defined('PERMANENT_LOGIN_SECRET')) ? PERMANENT_LOGIN_SECRET : '';
$this->cookie_lifetime = ((defined('PERMANENT_LOGIN_EXPIRES') && ((int)PERMANENT_LOGIN_EXPIRES) > 0) ? ((int)PERMANENT_LOGIN_EXPIRES) : 14) * 86400;
$this->cookie_name = 'zcrm_' . md5(STORE_NAME);
Expand Down
8 changes: 7 additions & 1 deletion readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<body>
<h1>Remember Me (Automatic Login) &mdash; for Zen Cart v1.5.5</h1>
<h3>Version 1.4.5</h3>
<h3>Version 1.4.6</h3>
<p>Current Support Thread at Zen Cart Forums: <a href="https://www.zen-cart.com/forum/showthread.php?t=57982" target="_blank">https://www.zen-cart.com/forum/showthread.php?t=57982</a></p>

<hr />
Expand Down Expand Up @@ -83,6 +83,12 @@ <h3>Authors' History</h3>
</ol>
<h3>Versions and Changes</h3>
<ul>
<li>v1.4.6, 2018-01-01 (lat9):<ul>
<li>BUGFIX: Correct parentheses-mismatch introduced in v1.4.5, resulting in debug-log generation.</li>
<li>The following files were changed:<ol>
<li>/includes/classes/observers/class.remember_me_observer.php</li>
</ol></li>
</ul></li>
<li>v1.4.5, 2017-12-28 (lat9):<ul>
<li>BUGFIX: Additional management and logging when an existing cookie can't be decoded or was deleted.</li>
<li>BUGFIX: Disable customer &quot;remembering&quot; when the customer is checking-out as a guest.</li>
Expand Down

0 comments on commit 6a5a416

Please sign in to comment.