diff options
author | Stephan Orbaugh <62374139+sorbaugh@users.noreply.github.com> | 2024-10-08 10:17:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-08 10:17:59 +0200 |
commit | 166d2f06f3c8d047f896e72d78878a13cd78075c (patch) | |
tree | 697ac5a28028e2024befa117fe8f0f026feed720 /apps/admin_audit/lib/AppInfo/Application.php | |
parent | c4a8faaa193cd6777579458c17c6a380159c033e (diff) | |
parent | bc125c982b97f88b292c99687bf878d61585ec2f (diff) | |
download | nextcloud-server-166d2f06f3c8d047f896e72d78878a13cd78075c.tar.gz nextcloud-server-166d2f06f3c8d047f896e72d78878a13cd78075c.zip |
Merge pull request #48551 from nextcloud/backport/48548/stable30
[stable30] fix(admin_audit): Listen to the right events
Diffstat (limited to 'apps/admin_audit/lib/AppInfo/Application.php')
-rw-r--r-- | apps/admin_audit/lib/AppInfo/Application.php | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php index 79c6640e2e2..a95ba0e684a 100644 --- a/apps/admin_audit/lib/AppInfo/Application.php +++ b/apps/admin_audit/lib/AppInfo/Application.php @@ -32,12 +32,11 @@ use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengeFailed; use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed; use OCP\Console\ConsoleEvent; use OCP\EventDispatcher\IEventDispatcher; +use OCP\Files\Events\Node\BeforeNodeDeletedEvent; use OCP\Files\Events\Node\BeforeNodeReadEvent; use OCP\Files\Events\Node\BeforeNodeRenamedEvent; -use OCP\Files\Events\Node\BeforeNodeWrittenEvent; use OCP\Files\Events\Node\NodeCopiedEvent; use OCP\Files\Events\Node\NodeCreatedEvent; -use OCP\Files\Events\Node\NodeDeletedEvent; use OCP\Files\Events\Node\NodeRenamedEvent; use OCP\Files\Events\Node\NodeWrittenEvent; use OCP\IConfig; @@ -218,16 +217,9 @@ class Application extends App implements IBootstrap { ); $eventDispatcher->addListener( - BeforeNodeWrittenEvent::class, - function (BeforeNodeWrittenEvent $event) use ($fileActions) { - $fileActions->write($event); - } - ); - - $eventDispatcher->addListener( NodeWrittenEvent::class, - function (NodeWrittenEvent $event) use ($fileActions) { - $fileActions->update($event); + function (NodeWrittenEvent $event) use ($fileActions): void { + $fileActions->write($event); } ); @@ -239,8 +231,8 @@ class Application extends App implements IBootstrap { ); $eventDispatcher->addListener( - NodeDeletedEvent::class, - function (NodeDeletedEvent $event) use ($fileActions) { + BeforeNodeDeletedEvent::class, + function (BeforeNodeDeletedEvent $event) use ($fileActions): void { $fileActions->delete($event); } ); |