mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
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:
@@ -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'];
|
||||
|
||||
Reference in New Issue
Block a user