diff options
| author | Chen-Pang He <jdh8@ms63.hinet.net> | 2014-06-11 12:07:45 +0800 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2014-06-12 03:12:27 +0200 |
| commit | 7933abd271b5bb3578cd80f62302cc6ac8961b91 (patch) | |
| tree | 6bf3f59dc701e8a6ab6a33c0c2cd7f907c3c920a /inc/mod | |
| parent | 23d6e8203806bba22b6444cd09e53da9fc7c501a (diff) | |
Fix vichan #65
Conflicts:
inc/mod/auth.php
inc/mod/pages.php
Diffstat (limited to 'inc/mod')
| -rw-r--r-- | inc/mod/auth.php | 4 | ||||
| -rw-r--r-- | inc/mod/pages.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/inc/mod/auth.php b/inc/mod/auth.php index 182f3ee2..01ed5b68 100644 --- a/inc/mod/auth.php +++ b/inc/mod/auth.php @@ -69,13 +69,13 @@ function setCookies() { $mod['hash'][0] . // password ':' . $mod['hash'][1], // salt - time() + $config['cookies']['expire'], $config['cookies']['jail'] ? $config['cookies']['path'] : '/', null, isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'], $config['cookies']['httponly']); + time() + $config['cookies']['expire'], $config['cookies']['jail'] ? $config['cookies']['path'] : '/', null, !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off', $config['cookies']['httponly']); } function destroyCookies() { global $config; // Delete the cookies - setcookie($config['cookies']['mod'], 'deleted', time() - $config['cookies']['expire'], $config['cookies']['jail']?$config['cookies']['path'] : '/', null, isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'], true); + setcookie($config['cookies']['mod'], 'deleted', time() - $config['cookies']['expire'], $config['cookies']['jail']?$config['cookies']['path'] : '/', null, !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off', true); } function modLog($action, $_board=null) { diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 0af16a9c..05a24865 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -150,7 +150,7 @@ function mod_dashboard() { $latest = false; } - setcookie('update', serialize($latest), time() + $config['check_updates_time'], $config['cookies']['jail'] ? $config['cookies']['path'] : '/', null, isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'], true); + setcookie('update', serialize($latest), time() + $config['check_updates_time'], $config['cookies']['jail'] ? $config['cookies']['path'] : '/', null, !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off', true); } if ($latest) |
