Changeset 1176 for trunk/include
- Timestamp:
- Apr 15, 2006, 12:15:24 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_session.inc.php
r1164 r1176 166 166 ;'; 167 167 pwg_query($query); 168 if ( mysql_affected_rows()==-1 ) 169 { 168 if ( mysql_affected_rows()==0 ) 169 { // 2 possible cases: 170 //- the user has just login so we need to insert 171 //- the user went through 2 pages very fast (in the same second), so 172 // data and expiration are the same as before 170 173 $query = ' 174 SELECT id FROM '.SESSIONS_TABLE.' 175 WHERE id = \''.$session_id.'\' 176 ;'; 177 $id = array_from_query( $query, array('id') ); 178 if ( empty($id) ) 179 { 180 $query = ' 171 181 INSERT INTO '.SESSIONS_TABLE.' 172 182 (id,data,expiration) 173 183 VALUES(\''.$session_id.'\',\''.$data.'\',now()) 174 184 ;'; 175 pwg_query($query); 185 pwg_query($query); 186 } 176 187 } 177 188 return true;
Note: See TracChangeset
for help on using the changeset viewer.