From 5e20c3e7b97598a8e632d9c5ccdef7de7813a4e8 Mon Sep 17 00:00:00 2001 From: Akhil Date: Fri, 13 Oct 2023 13:38:03 +0530 Subject: Add custom apps translation scripts and image path for consistency Signed-off-by: Akhil --- lib/private/Template/JSResourceLocator.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/private/Template/JSResourceLocator.php b/lib/private/Template/JSResourceLocator.php index b283f0b610f..68a83fa4b73 100644 --- a/lib/private/Template/JSResourceLocator.php +++ b/lib/private/Template/JSResourceLocator.php @@ -60,8 +60,13 @@ class JSResourceLocator extends ResourceLocator { $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.'core/'.$script); $found += $this->appendScriptIfExist($this->serverroot, $script); $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.$script); - $found += $this->appendScriptIfExist($this->serverroot, 'apps/'.$script); - $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.'apps/'.$script); + + foreach (\OC::$APPSROOTS as $appRoot) { + $dirName = basename($appRoot['path']); + $rootPath = dirname($appRoot['path']); + $found += $this->appendScriptIfExist($rootPath, $dirName.'/'.$script); + $found += $this->appendScriptIfExist($this->serverroot, $theme_dir.$dirName.'/'.$script); + } if ($found) { return; -- cgit v1.2.3