src/java/de/uapcore/lightpit/AbstractLightPITServlet.java

changeset 20
bd1a76c91d5b
parent 18
a94b172c3a93
child 21
b213fef2539e
--- a/src/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Sat Mar 31 18:11:09 2018 +0200
+++ b/src/java/de/uapcore/lightpit/AbstractLightPITServlet.java	Sat Mar 31 19:35:04 2018 +0200
@@ -249,9 +249,11 @@
     private void doProcess(HttpMethod method, HttpServletRequest req, HttpServletResponse resp)
             throws ServletException, IOException {
         
-        HttpSession session = req.getSession();
+        // Synchronize module information with database
+        getModuleManager().syncWithDatabase(getDatabaseFacade());
         
         // choose the requested language as session language (if available) or fall back to english, otherwise
+        HttpSession session = req.getSession();
         if (session.getAttribute(Constants.SESSION_ATTR_LANGUAGE) == null) {
             Optional<List<String>> availableLanguages = Functions.availableLanguages(getServletContext()).map(Arrays::asList);
             Optional<Locale> reqLocale = Optional.of(req.getLocale());

mercurial