diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-12-09 21:24:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-09 21:24:55 +0100 |
commit | 0360ab408e14a7f59f82380b8c2d70b837526651 (patch) | |
tree | e41e15badb3931eb59e140a069f142aea108e82d /lib | |
parent | 061b9bb0e7445a005f07ca98bdc21c0180d4182f (diff) | |
parent | 1c585d2c502482624497f8e7d82a4f75f70c439c (diff) | |
download | nextcloud-server-0360ab408e14a7f59f82380b8c2d70b837526651.tar.gz nextcloud-server-0360ab408e14a7f59f82380b8c2d70b837526651.zip |
Merge pull request #18256 from nextcloud/files-aditional-scripts-new-events
Use non-depricated events for loading additional scripts in files app
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php index ee3953f6178..f8837763373 100644 --- a/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php +++ b/lib/private/AppFramework/Middleware/AdditionalScriptsMiddleware.php @@ -31,6 +31,7 @@ use OCP\AppFramework\Http\StandaloneTemplateResponse; use OCP\AppFramework\Http\TemplateResponse; use OCP\AppFramework\Middleware; use OCP\AppFramework\PublicShareController; +use OCP\EventDispatcher\GenericEvent; use OCP\IUserSession; use Symfony\Component\EventDispatcher\EventDispatcherInterface; @@ -55,10 +56,10 @@ class AdditionalScriptsMiddleware extends Middleware { } if ($response instanceof TemplateResponse) { - $this->dispatcher->dispatch(TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS); + $this->dispatcher->dispatch(TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS, new GenericEvent()); if (!($response instanceof StandaloneTemplateResponse) && $this->userSession->isLoggedIn()) { - $this->dispatcher->dispatch(TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN); + $this->dispatcher->dispatch(TemplateResponse::EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN, new GenericEvent()); } } |