diff options
Diffstat (limited to 'apps/admin_audit/lib/Actions/Files.php')
-rw-r--r-- | apps/admin_audit/lib/Actions/Files.php | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/apps/admin_audit/lib/Actions/Files.php b/apps/admin_audit/lib/Actions/Files.php index 50448e88f70..5c08640d2d2 100644 --- a/apps/admin_audit/lib/Actions/Files.php +++ b/apps/admin_audit/lib/Actions/Files.php @@ -18,7 +18,6 @@ use OCP\Files\Events\Node\NodeRenamedEvent; use OCP\Files\Events\Node\NodeWrittenEvent; use OCP\Files\InvalidPathException; use OCP\Files\NotFoundException; -use OCP\Preview\BeforePreviewFetchedEvent; use Psr\Log\LoggerInterface; /** @@ -229,33 +228,4 @@ class Files extends Action { array_keys($params) ); } - - /** - * Logs preview access to a file - * - * @param BeforePreviewFetchedEvent $event - */ - public function preview(BeforePreviewFetchedEvent $event): void { - try { - $file = $event->getNode(); - $params = [ - 'id' => $file->getId(), - 'width' => $event->getWidth(), - 'height' => $event->getHeight(), - 'crop' => $event->isCrop(), - 'mode' => $event->getMode(), - 'path' => mb_substr($file->getInternalPath(), 5) - ]; - } catch (InvalidPathException|NotFoundException $e) { - \OCP\Server::get(LoggerInterface::class)->error( - 'Exception thrown in file preview: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e] - ); - return; - } - $this->log( - 'Preview accessed: (id: "%s", width: "%s", height: "%s" crop: "%s", mode: "%s", path: "%s")', - $params, - array_keys($params) - ); - } } |