fix: sessions

css 3px image border goes from both clear and dark to image.css

git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1175 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2006-04-14 22:14:53 +00:00
parent afa5ab27a5
commit 5971c5c995
4 changed files with 23 additions and 7 deletions
+13 -2
View File
@@ -166,13 +166,24 @@ UPDATE '.SESSIONS_TABLE.'
;';
pwg_query($query);
if ( mysql_affected_rows()==0 )
{
{ // 2 possible cases:
//- the user has just login so we need to insert
//- the user went through 2 pages very fast (in the same second), so
// data and expiration are the same as before
$query = '
SELECT id FROM '.SESSIONS_TABLE.'
WHERE id = \''.$session_id.'\'
;';
$id = array_from_query( $query, array('id') );
if ( empty($id) )
{
$query = '
INSERT INTO '.SESSIONS_TABLE.'
(id,data,expiration)
VALUES(\''.$session_id.'\',\''.$data.'\',now())
;';
pwg_query($query);
pwg_query($query);
}
}
return true;
}