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
This commit is contained in:
z0rglub
2003-08-29 23:28:14 +00:00
parent 720b07bb07
commit b5bc939149
+6
View File
@@ -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'];