diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php index de1a02026bf..8e5391b4365 100644 --- a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php +++ b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php @@ -27,6 +27,7 @@ namespace OC\AppFramework\Middleware; use OCP\AppFramework\Http\Response; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Middleware; +use OCP\AppFramework\PublicShareController; use OCP\IUserSession; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -42,6 +43,14 @@ class AdditionalScriptsMiddleware extends Middleware { } public function afterController($controller, $methodName, Response $response): Response { + /* + * There is no need to emit these signals on a public share page + * There is a separate event for that already + */ + if ($controller instanceof PublicShareController) { + return $response; + } + if ($response instanceof TemplateResponse) { $this->dispatcher->dispatch(TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS); |