mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 18:01:31 +02:00
- bug fixed : when a user is the guest user, login saved in history table is
"guest" and not the localized version of guest username git-svn-id: http://piwigo.org/svn/trunk@725 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -333,14 +333,20 @@ function pwg_log( $file, $category, $picture = '' )
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
if ( $conf['log'] )
|
||||
if ($conf['log'])
|
||||
{
|
||||
$query = 'insert into '.HISTORY_TABLE;
|
||||
$query.= ' (date,login,IP,file,category,picture) values';
|
||||
$query.= " (NOW(), '".$user['username']."'";
|
||||
$query.= ",'".$_SERVER['REMOTE_ADDR']."'";
|
||||
$query.= ",'".$file."','".$category."','".$picture."');";
|
||||
pwg_query( $query );
|
||||
$query = '
|
||||
INSERT INTO '.HISTORY_TABLE.'
|
||||
(date,login,IP,file,category,picture)
|
||||
VALUES
|
||||
(NOW(),
|
||||
\''.(($user['id'] == 2) ? 'guest' : $user['username']).'\',
|
||||
\''.$_SERVER['REMOTE_ADDR'].'\',
|
||||
\''.$file.'\',
|
||||
\''.$category.'\',
|
||||
\''.$picture.'\')
|
||||
;';
|
||||
pwg_query($query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user