aboutsummaryrefslogtreecommitdiffstats
path: root/profile.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2003-08-29 23:28:14 +0000
committerz0rglub <z0rglub@piwigo.org>2003-08-29 23:28:14 +0000
commitb5bc93914972e247aeb6dbe3dd7e319e13f5034a (patch)
treea0a5bf0d0fbe4fbae18793644dca36c0e4dd44bf /profile.php
parent720b07bb075245ad8c9c46092c13ce0fad54c21d (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
Diffstat (limited to 'profile.php')
-rw-r--r--profile.php6
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'];