Skip to content

Commit fdefb9c

Browse files
committed
fix: getDefaultApp()
1 parent c976969 commit fdefb9c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/Controller/AppRegistryController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ private function buildWebUri(array $app_info, string $fileId): ?string {
309309
private function getDefaultApp(string $mimeType): ?string {
310310
# get mime from file and see which of the enabled apps matches
311311
foreach (self::$apps as $app_name => $app_info) {
312-
if ($this->appManager->isEnabledForUser($app_name)) {
312+
$oc_app_name = $app_info['oc_app_name'];
313+
if ($this->appManager->isEnabledForUser($oc_app_name)) {
313314
if (\in_array($mimeType, $app_info['mime-types'], true)) {
314315
return $app_name;
315316
}

0 commit comments

Comments
 (0)