diff --git a/patches/037-onlyoffice-active-appicon.patch b/patches/037-onlyoffice-active-appicon.patch new file mode 100644 index 0000000000000000000000000000000000000000..87fc60b35a854a1a1ec64e46eb58f27347369cb1 --- /dev/null +++ b/patches/037-onlyoffice-active-appicon.patch @@ -0,0 +1,33 @@ +From: Ronak +Date: Tue, 23 Jul 2024 11:24:27 +0100 +Subject: [PATCH] Apply Active App-Icon for OnlyOffice Apps + +This patch resolves the issue of the active app-icon for OnlyOffice apps. +--- ./custom_apps/onlyoffice/lib/Controller/EditorController.php 2024-07-22 22:58:03 ++++ ./custom_apps/onlyoffice/lib/Controller/EditorController-new.php 2024-07-23 15:40:54 +@@ -1282,10 +1282,23 @@ + $csp->addAllowedFrameDomain("'self'"); + } + $response->setContentSecurityPolicy($csp); +- ++ $app = $this->appName.'_'.$this->getExt($fileId); ++ \OC::$server->getNavigationManager()->setActiveEntry($app); + return $response; + } +- ++ private function getExt($fileId) ++ { ++ $user = $this->userSession->getUser(); ++ $userId = null; ++ if (empty($user)) { ++ return ''; ++ } ++ $userId = $user->getUID(); ++ list($file, $error, $share) = $this->getFile($userId, $fileId); ++ $fileName = $file->getName(); ++ $ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION)); ++ return $ext; ++ } + /** + * Print public editor section + *