Simplify cookie expiration
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1144 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
47dca38d4b
commit
3675fe6feb
|
@ -168,7 +168,7 @@ function where_link($i, $column, $value) {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function cookie($name, $value) {
|
function cookie($name, $value) {
|
||||||
return setcookie($name, $value, gmmktime(0, 0, 0, gmdate("n") + 1), preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"]));
|
return setcookie($name, $value, time() + 2592000, preg_replace('~\\?.*~', '', $_SERVER["REQUEST_URI"])); // 2592000 = 30 * 24 * 60 * 60
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Send Location header and exit
|
/** Send Location header and exit
|
||||||
|
|
Loading…
Reference in a new issue