[ofbiz-framework] branch release17.12 updated: Fixed: Theme files loading taking longer time (OFBIZ-11665)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release17.12 updated: Fixed: Theme files loading taking longer time (OFBIZ-11665)

Pawan Verma-2
This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch release17.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release17.12 by this push:
     new 6b04468  Fixed: Theme files loading taking longer time (OFBIZ-11665)
6b04468 is described below

commit 6b04468f4559a31d9bc9d043060fac8f7b5a5cdd
Author: Pawan Verma <[hidden email]>
AuthorDate: Sun May 10 14:17:13 2020 +0530

    Fixed: Theme files loading taking longer time
    (OFBIZ-11665)
   
    Thanks: Pierre and Jacques for the review.
---
 .../src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
index 050b3a9..02e27c2 100644
--- a/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
+++ b/framework/widget/src/main/java/org/apache/ofbiz/widget/model/ThemeFactory.java
@@ -78,9 +78,11 @@ public class ThemeFactory {
      */
     private static void pullModelThemesFromXmlToCache() {
         String ofbizHome = System.getProperty("ofbiz.home");
+        String themeFolderPath = ofbizHome + "/themes";
+        String pluginsFolderPath = ofbizHome + "/plugins";
         try {
-            List<File> xmlThemes = FileUtil.findXmlFiles(ofbizHome, "themes", "theme", "widget-theme.xsd");
-            List<File> xmlPluginThemes = FileUtil.findXmlFiles(ofbizHome, "plugins", "theme", "widget-theme.xsd");
+            List<File> xmlThemes = FileUtil.findXmlFiles(themeFolderPath, null, "theme", "widget-theme.xsd");
+            List<File> xmlPluginThemes = FileUtil.findXmlFiles(pluginsFolderPath, null, "theme", "widget-theme.xsd");
             if (UtilValidate.isNotEmpty(xmlPluginThemes)) {
                 xmlThemes.addAll(xmlPluginThemes);
             }