Skip to content

Commit 21d9cd0

Browse files
committed
fix(navigation): Trigger navigation setup and AppsLoadedEvent on ocs routes
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent 02801e1 commit 21d9cd0

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

build/psalm-baseline.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4080,6 +4080,11 @@
40804080
<code><![CDATA[DEFAULT_TTL]]></code>
40814081
</AmbiguousConstantInheritance>
40824082
</file>
4083+
<file src="ocs/v1.php">
4084+
<InternalMethod>
4085+
<code><![CDATA[setup]]></code>
4086+
</InternalMethod>
4087+
</file>
40834088
<file src="public.php">
40844089
<DeprecatedMethod>
40854090
<code><![CDATA[getAppValue]]></code>

ocs/v1.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@
7979
$appManager->loadApps(['core']);
8080
}
8181

82+
// All apps are now loaded to handle the request
83+
Server::get(\OC\NavigationManager::class)->setup();
84+
Server::get(\OCP\EventDispatcher\IEventDispatcher::class)->dispatchTyped(new \OCP\App\Events\AppsLoadedEvent());
85+
8286
Server::get(Router::class)->match('/ocsapp' . $request->getRawPathInfo());
8387
} catch (MaxDelayReached $ex) {
8488
ApiHelper::respond(Http::STATUS_TOO_MANY_REQUESTS, $ex->getMessage());

0 commit comments

Comments
 (0)