Changeset 1191
- Timestamp:
- Apr 17, 2006, 5:09:57 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_6/include/functions_session.inc.php
r1175 r1191 166 166 ;'; 167 167 pwg_query($query); 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 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 = ' 168 if ( mysql_affected_rows()>0 ) 169 { 170 return true; 171 } 172 $query = ' 181 173 INSERT INTO '.SESSIONS_TABLE.' 182 174 (id,data,expiration) 183 175 VALUES(\''.$session_id.'\',\''.$data.'\',now()) 184 176 ;'; 185 pwg_query($query); 186 } 187 } 177 pwg_query($query); 188 178 return true; 189 179 }
Note: See TracChangeset
for help on using the changeset viewer.