Ignore:
Timestamp:
Apr 15, 2006, 12:15:24 AM (18 years ago)
Author:
rvelices
Message:

merge r1175 from branch-1_6 into trunk

fix: sessions

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_session.inc.php

    r1164 r1176  
    166166;';
    167167  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
    170173    $query = '
     174SELECT 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 = '
    171181INSERT INTO '.SESSIONS_TABLE.'
    172182  (id,data,expiration)
    173183  VALUES(\''.$session_id.'\',\''.$data.'\',now())
    174184;';
    175     pwg_query($query);
     185      pwg_query($query);
     186    }
    176187  }
    177188  return true;
Note: See TracChangeset for help on using the changeset viewer.