From b5bc93914972e247aeb6dbe3dd7e319e13f5034a Mon Sep 17 00:00:00 2001 From: z0rglub Date: Fri, 29 Aug 2003 23:28:14 +0000 Subject: 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 --- profile.php | 6 ++++++ 1 file changed, 6 insertions(+) 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']; -- cgit v1.2.3