mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-05 09:22:21 +02:00
fixes #1529 rewrite list of filter users for activities
* migration task to update activity.performed_by (with object_id) for logout action (was always user guest instead of the real user) * activities: use the actual regrouped lines to list filter users (instead of performing a separate SQL query)
This commit is contained in:
@@ -582,11 +582,18 @@ function pwg_activity($object, $object_id, $action, $details=array())
|
||||
|
||||
foreach ($object_ids as $loop_object_id)
|
||||
{
|
||||
$performed_by = $user['id'];
|
||||
|
||||
if ('logout' == $action)
|
||||
{
|
||||
$performed_by = $loop_object_id;
|
||||
}
|
||||
|
||||
$inserts[] = array(
|
||||
'object' => $object,
|
||||
'object_id' => $loop_object_id,
|
||||
'action' => $action,
|
||||
'performed_by' => $user['id'],
|
||||
'performed_by' => $performed_by,
|
||||
'session_idx' => session_id(),
|
||||
'ip_address' => $ip_address,
|
||||
'details' => $details_insert,
|
||||
|
||||
Reference in New Issue
Block a user