Browse Source

chore(trashbin): Store deleted by user

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/44643/head
Christopher Ng 3 weeks ago
parent
commit
b41834fb8d
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      apps/files_trashbin/lib/Trashbin.php

+ 4
- 2
apps/files_trashbin/lib/Trashbin.php View File

@@ -228,7 +228,8 @@ class Trashbin {
->setValue('id', $query->createNamedParameter($targetFilename))
->setValue('timestamp', $query->createNamedParameter($timestamp))
->setValue('location', $query->createNamedParameter($targetLocation))
->setValue('user', $query->createNamedParameter($user));
->setValue('user', $query->createNamedParameter($user))
->setValue('deleted_by', $query->createNamedParameter($user));
$result = $query->executeStatement();
if (!$result) {
\OC::$server->get(LoggerInterface::class)->error('trash bin database couldn\'t be updated for the files owner', ['app' => 'files_trashbin']);
@@ -358,7 +359,8 @@ class Trashbin {
->setValue('id', $query->createNamedParameter($filename))
->setValue('timestamp', $query->createNamedParameter($timestamp))
->setValue('location', $query->createNamedParameter($location))
->setValue('user', $query->createNamedParameter($owner));
->setValue('user', $query->createNamedParameter($owner))
->setValue('deleted_by', $query->createNamedParameter($user));
$result = $query->executeStatement();
if (!$result) {
\OC::$server->get(LoggerInterface::class)->error('trash bin database couldn\'t be updated', ['app' => 'files_trashbin']);

Loading…
Cancel
Save