Skip to content

Commit

Permalink
Don't store default_horde_view cookie if it is auto (the default)
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jun 12, 2014
1 parent 0935219 commit 713d009
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion framework/Core/lib/Horde/Core/Auth/Application.php
Expand Up @@ -672,7 +672,14 @@ protected function _setView()
if (empty($conf['user']['select_view'])) {
$mode = 'auto';
} else {
setcookie('default_horde_view', $mode, time() + 30 * 86400, $conf['cookie']['path'], $conf['cookie']['domain']);
/* 'auto' is default, so don't store in cookie. */
setcookie(
'default_horde_view',
($mode == 'auto') ? '' : $mode,
time() + (($mode == 'auto') ? -3600 : (30 * 86400)),
$conf['cookie']['path'],
$conf['cookie']['domain']
);
}
} else {
// Forcing mode as per config.
Expand Down

0 comments on commit 713d009

Please sign in to comment.