From 2eba0895c90c77c9b15da5200aa924cdcedce6fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Nana?= <sebastien.nana@maarch.org>
Date: Wed, 19 Oct 2011 14:03:44 +0000
Subject: [PATCH] evo : include custom lang of modules

---
 core/trunk/core/class/class_core_tools.php | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/core/trunk/core/class/class_core_tools.php b/core/trunk/core/class/class_core_tools.php
index 03bc61cd8de..cbe4ae34986 100644
--- a/core/trunk/core/class/class_core_tools.php
+++ b/core/trunk/core/class/class_core_tools.php
@@ -264,18 +264,20 @@ class core_tools extends functions
     /**
     * Loads language variables of each module
     *
-    * @param $modules array Enabled modules of the application
+    * @param  $modules array Enabled modules of the application
     */
     private function load_lang_modules($modules)
     {
-        for ($i=0;$i<count($modules);$i++) {
-            $file_path = $_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.'modules'.DIRECTOR$
-            if (!file_exists($file_path)) {
-                $file_path = $_SESSION['config']['corepath'].'modules'.DIRECTORY_SEPARATOR.$modules[$i]['moduleid'].DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEP$
-            }
-            if (isset($_SESSION['config']['lang']) && file_exists($file_path)) {
+        for($i=0;$i<count($modules);$i++)
+        {
+            $file_path = $_SESSION['config']['corepath'].'modules'.DIRECTORY_SEPARATOR.$modules[$i]['moduleid'].DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.$_SESSION['config']['lang'].'.php';
+            if(isset($_SESSION['config']['lang']) && file_exists($file_path ))
+            {
+
                 include($file_path);
-            } else {
+            }
+            else
+            {
                 $_SESSION['error'] .= "Language file missing for module : ".$modules[$i]['moduleid']."<br/>";
             }
         }
-- 
GitLab