Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2022-10-27 17:05:40 +0300
committerJulius Härtl <jus@bitgrid.net>2022-10-27 17:57:35 +0300
commitf0d88ba9be4978a163577ae16e12aeedba52412f (patch)
tree9af8513c99e7cd21d5c8f34a97fa78440ab128d2
parent0d5cdf3b80265c6db884133eadececdfe4ac0313 (diff)
Adjust preview event name to BeforePreviewFetchedEvent
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--lib/AppInfo/Application.php4
-rw-r--r--lib/Listener/BeforeFetchPreviewListener.php4
-rw-r--r--tests/psalm-baseline.xml4
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index c61b92ad..0b0bf37e 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -53,7 +53,7 @@ use OCP\Files\Template\TemplateFileCreator;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IPreview;
-use OCP\Preview\BeforeFetchPreviewEvent;
+use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Security\CSP\AddContentSecurityPolicyEvent;
class Application extends App implements IBootstrap {
@@ -72,7 +72,7 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(AddContentSecurityPolicyEvent::class, CSPListener::class);
$context->registerEventListener(LoadViewer::class, LoadViewerListener::class);
$context->registerEventListener(ShareLinkAccessedEvent::class, ShareLinkListener::class);
- $context->registerEventListener(BeforeFetchPreviewEvent::class, BeforeFetchPreviewListener::class);
+ $context->registerEventListener(BeforePreviewFetchedEvent::class, BeforeFetchPreviewListener::class);
}
public function boot(IBootContext $context): void {
diff --git a/lib/Listener/BeforeFetchPreviewListener.php b/lib/Listener/BeforeFetchPreviewListener.php
index 20163f15..38827d03 100644
--- a/lib/Listener/BeforeFetchPreviewListener.php
+++ b/lib/Listener/BeforeFetchPreviewListener.php
@@ -33,7 +33,7 @@ use OCP\EventDispatcher\IEventListener;
use OCP\Files\NotFoundException;
use OCP\IRequest;
use OCP\IUserSession;
-use OCP\Preview\BeforeFetchPreviewEvent;
+use OCP\Preview\BeforePreviewFetchedEvent;
use OCP\Share\Exceptions\ShareNotFound;
use OCP\Share\IManager;
use OCP\Share\IShare;
@@ -52,7 +52,7 @@ class BeforeFetchPreviewListener implements IEventListener {
}
public function handle(Event $event): void {
- if (!$event instanceof BeforeFetchPreviewEvent) {
+ if (!$event instanceof BeforePreviewFetchedEvent) {
return;
}
$shareToken = $this->request->getParam('token');
diff --git a/tests/psalm-baseline.xml b/tests/psalm-baseline.xml
index bf7f35c2..5c491609 100644
--- a/tests/psalm-baseline.xml
+++ b/tests/psalm-baseline.xml
@@ -23,7 +23,7 @@
<code>Pdf</code>
</MissingDependency>
<UndefinedClass occurrences="1">
- <code>BeforeFetchPreviewEvent</code>
+ <code>BeforePreviewFetchedEvent</code>
</UndefinedClass>
</file>
<file src="lib/Command/ActivateConfig.php">
@@ -154,7 +154,7 @@
</file>
<file src="lib/Listener/BeforeFetchPreviewListener.php">
<UndefinedClass occurrences="1">
- <code>BeforeFetchPreviewEvent</code>
+ <code>BeforePreviewFetchedEvent</code>
</UndefinedClass>
</file>
<file src="lib/PermissionManager.php">