[ofbiz-framework] branch release18.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 release18.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 release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


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

commit e15c82b2542717bff5ad57cebc6c106fed192614
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);
             }