Skip to content

Commit 7b2c7d6

Browse files
susnuxbackportbot[bot]
authored andcommitted
fix: make sure the core app is loaded
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 5bbf229 commit 7b2c7d6

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

lib/base.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,7 @@ public static function init(): void {
850850

851851
// Make sure that the application class is not loaded before the database is setup
852852
if ($systemConfig->getValue('installed', false)) {
853+
$appManager->loadApp('core');
853854
$appManager->loadApp('settings');
854855
}
855856

lib/private/App/AppManager.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,8 +1187,11 @@ public function isAppCompatible(string $serverVersion, array $appInfo, bool $ign
11871187

11881188
#[\Override]
11891189
public function getAppNamespace(string $appId): string {
1190-
$topNamespace = 'OCA\\';
1190+
if ($appId === 'core') {
1191+
return 'OC\\Core';
1192+
}
11911193

1194+
$topNamespace = 'OCA\\';
11921195
// Hit the cache!
11931196
if (isset($this->namespaceCache[$appId])) {
11941197
return $topNamespace . $this->namespaceCache[$appId];

lib/private/NavigationManager.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,6 @@ private function init(bool $resolveClosures = true): void {
212212
}
213213

214214
foreach ($apps as $app) {
215-
if (!$this->userSession->isLoggedIn() && !$this->appManager->isEnabledForUser($app, $this->userSession->getUser())) {
216-
continue;
217-
}
218-
219215
// load plugins and collections from info.xml
220216
$info = $this->appManager->getAppInfo($app);
221217
if (!isset($info['navigations']['navigation'])) {
@@ -261,14 +257,14 @@ private function init(bool $resolveClosures = true): void {
261257
'order' => $order,
262258
// Target of the navigation entry
263259
'href' => $route,
264-
// The icon used for the naviation entry
260+
// The icon used for the navigation entry
265261
'icon' => $icon,
266262
// Type of the navigation entry ('link' vs 'settings')
267263
'type' => $type,
268264
// Localized name of the navigation entry
269265
'name' => $l->t($nav['name']),
270266
], $type === 'link' ? [
271-
// App that registered this navigation entry (not necessarly the same as the id)
267+
// App that registered this navigation entry (not necessarily the same as the id)
272268
'app' => $app,
273269
] : []
274270
));

0 commit comments

Comments
 (0)