Ignore:
Timestamp:
Dec 18, 2004, 11:05:30 PM (19 years ago)
Author:
plg
Message:
  • bug fixed : in admin/cat_list, next_rank cant' be calculted and query to count sub-categories per sub-categories became false if no sub-categories
  • virtual association come back in admin/infos_images (not only in admin/picture_modify)
  • check_favorites function in admin section becomes check_user_favorites in public section : favorites are checked when user tries to display his favorites. Function was optimized.
  • in function update_category, wrap of long queries due to many categories to update at the same time
  • typo fixed in description of paginate_pages_around configuration parameter
  • bug fixed in new navigation bar : no separation pipe was displayed between next and last when the page displayed was the last
  • sessions.expiration changed of type from int to datetime (a lot easier to read)
  • sessions.ip removed : IP address is no longer used to verify session
  • typo fixed in language/en_UK.iso-8859-1/admin.lang.php on editcat_lock_info language item
File:
1 edited

Legend:

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

    r593 r647  
    6060  $page['session_id'] = $session_id;
    6161  $query = '
    62 SELECT user_id,expiration,ip
     62SELECT user_id,expiration,NOW() AS now
    6363  FROM '.SESSIONS_TABLE.'
    6464  WHERE id = \''.$page['session_id'].'\'
     
    6868  {
    6969    $row = mysql_fetch_array($result);
    70     if (!$user['has_cookie'])
     70    if (strnatcmp($row['expiration'], $row['now']) < 0)
    7171    {
    72       if ($row['expiration'] < time())
    73       {
    74         // deletion of the session from the database,
    75         // because it is out-of-date
    76         $delete_query = 'DELETE FROM '.SESSIONS_TABLE;
    77         $delete_query.= " WHERE id = '".$page['session_id']."'";
    78         $delete_query.= ';';
    79         pwg_query($delete_query);
    80       }
    81       else if ($_SERVER['REMOTE_ADDR'] == $row['ip'])
    82       {
    83         $query_user .= ' WHERE id = '.$row['user_id'];
    84         $query_done = true;
    85       }
     72      // deletion of the session from the database, because it is
     73      // out-of-date
     74      $delete_query = '
     75DELETE FROM '.SESSIONS_TABLE.'
     76  WHERE id = \''.$page['session_id'].'\'
     77;';
     78      pwg_query($delete_query);
    8679    }
    8780    else
Note: See TracChangeset for help on using the changeset viewer.