diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2008-01-06 17:00:09 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-01-06 17:00:09 +0000 |
commit | 12a9e001837da139a9ea07b8dd52019ee071d9bd (patch) | |
tree | ede34133cd24f2fb7231e06f3933507d1241c13d /phpBB/includes/session.php | |
parent | a7984e660da4def80d28a4efeacb5ee861c4718c (diff) | |
download | forums-12a9e001837da139a9ea07b8dd52019ee071d9bd.tar forums-12a9e001837da139a9ea07b8dd52019ee071d9bd.tar.gz forums-12a9e001837da139a9ea07b8dd52019ee071d9bd.tar.bz2 forums-12a9e001837da139a9ea07b8dd52019ee071d9bd.tar.xz forums-12a9e001837da139a9ea07b8dd52019ee071d9bd.zip |
- Do not split topic list for topics being promoted to announcements after been moved to another forum (Bug #18635)
- Allow editing usernames within database_update on username cleanup (Bug #18415)
- Fixing wrong sync() calls if moving all posts by a member in ACP (Bug #18385)
- Check entered imagemagick path for trailing slash (Bug #18205)
- Use proper title on index for new/unread posts (Bug #13101) - patch provided by Pyramide
- Allow calls to $user->set_cookie() define no cookie time for setting session cookies (Bug #18025)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8310 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/session.php')
-rw-r--r-- | phpBB/includes/session.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 9411ec1ae6..afc9e810e3 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -872,7 +872,11 @@ class session /** * Sets a cookie * - * Sets a cookie of the given name with the specified data for the given length of time. + * Sets a cookie of the given name with the specified data for the given length of time. If no time is specified, a session cookie will be set. + * + * @param string $name Name of the cookie, will be automatically prefixed with the phpBB cookie name. track becomes [cookie_name]_track then. + * @param string $cookiedata The data to hold within the cookie + * @param int $cookietime The expiration time as UNIX timestamp. If 0 is provided, a session cookie is set. */ function set_cookie($name, $cookiedata, $cookietime) { @@ -882,7 +886,7 @@ class session $expire = gmdate('D, d-M-Y H:i:s \\G\\M\\T', $cookietime); $domain = (!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']; - header('Set-Cookie: ' . $name_data . '; expires=' . $expire . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false); + header('Set-Cookie: ' . $name_data . (($cookietime) ? '; expires=' . $expire : '') . '; path=' . $config['cookie_path'] . $domain . ((!$config['cookie_secure']) ? '' : '; secure') . '; HttpOnly', false); } /** |