Ignore:
Timestamp:
Feb 1, 2005, 8:29:37 AM (19 years ago)
Author:
plg
Message:
  • bug fixed : when a user is the guest user, login saved in history table is "guest" and not the localized version of guest username
File:
1 edited

Legend:

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

    r717 r725  
    334334  global $conf, $user;
    335335
    336   if ( $conf['log'] )
    337   {
    338     $query = 'insert into '.HISTORY_TABLE;
    339     $query.= ' (date,login,IP,file,category,picture) values';
    340     $query.= " (NOW(), '".$user['username']."'";
    341     $query.= ",'".$_SERVER['REMOTE_ADDR']."'";
    342     $query.= ",'".$file."','".$category."','".$picture."');";
    343     pwg_query( $query );
     336  if ($conf['log'])
     337  {
     338    $query = '
     339INSERT INTO '.HISTORY_TABLE.'
     340  (date,login,IP,file,category,picture)
     341  VALUES
     342  (NOW(),
     343  \''.(($user['id'] == 2) ? 'guest' : $user['username']).'\',
     344  \''.$_SERVER['REMOTE_ADDR'].'\',
     345  \''.$file.'\',
     346  \''.$category.'\',
     347  \''.$picture.'\')
     348;';
     349    pwg_query($query);
    344350  }
    345351}
Note: See TracChangeset for help on using the changeset viewer.