diff options
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); } ); |