From d182037bce570243a67d61f756fdf75bb4df17ff Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 29 Jan 2019 21:23:59 +0100 Subject: Emit to load additionalscripts Fixes #13662 This will fire of an event after a Template Response has been returned. There is an event for the generic loading and one when logged in. So apps can chose to load only on loged in pages. This is a more generic approach than the files app event. As some things we might want to load on other pages as well besides the files app. Signed-off-by: Roeland Jago Douma --- lib/private/AppFramework/DependencyInjection/DIContainer.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/private/AppFramework/DependencyInjection') diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php index 38857af0d39..de25f8fe4d3 100644 --- a/lib/private/AppFramework/DependencyInjection/DIContainer.php +++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php @@ -261,6 +261,9 @@ class DIContainer extends SimpleContainer implements IAppContainer { $c->query(\OCP\IConfig::class) ) ); + $dispatcher->registerMiddleware( + $c->query(\OC\AppFramework\Middleware\AdditionalScriptsMiddleware::class) + ); foreach($this->middleWares as $middleWare) { $dispatcher->registerMiddleware($c[$middleWare]); -- cgit v1.2.3