diff options
author | z0rglub <z0rglub@piwigo.org> | 2003-08-29 23:28:14 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2003-08-29 23:28:14 +0000 |
commit | b5bc93914972e247aeb6dbe3dd7e319e13f5034a (patch) | |
tree | a0a5bf0d0fbe4fbae18793644dca36c0e4dd44bf | |
parent | 720b07bb075245ad8c9c46092c13ce0fad54c21d (diff) |
Modify the expiration date of the session to correspond to the cookie
expiration date if a cookie is created (else the cookie session is deleted
in PhpWebGallery when modifying the configuration in the admin panel)
git-svn-id: http://piwigo.org/svn/trunk@60 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | profile.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/profile.php b/profile.php index 3aa5bb2c0..3c19adf5b 100644 --- a/profile.php +++ b/profile.php @@ -109,6 +109,12 @@ if ( isset( $_POST['submit'] ) ) { setcookie( 'id',$page['session_id'],$_POST['cookie_expiration'], cookie_path() ); + // update the expiration date of the session + $query = 'UPDATE '.PREFIX_TABLE.'sessions'; + $query.= ' SET expiration = '.$_POST['cookie_expiration']; + $query.= " WHERE id = '".$page['session_id']."'"; + $query.= ';'; + mysql_query( $query ); } // redirection $url = 'category.php?cat='.$page['cat'].'&expand='.$_GET['expand']; |