From 8e36f07e7b14429b728939aa0b648675e5c768c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Nana?= <sebastien.nana@maarch.org> Date: Wed, 19 Oct 2011 13:59:25 +0000 Subject: [PATCH] evo : include custom lang of modules --- core/trunk/core/class/class_core_tools.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/core/trunk/core/class/class_core_tools.php b/core/trunk/core/class/class_core_tools.php index cbe4ae34986..03bc61cd8de 100644 --- a/core/trunk/core/class/class_core_tools.php +++ b/core/trunk/core/class/class_core_tools.php @@ -264,20 +264,18 @@ 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'].'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); + 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$ } - else - { + if (isset($_SESSION['config']['lang']) && file_exists($file_path)) { + include($file_path); + } else { $_SESSION['error'] .= "Language file missing for module : ".$modules[$i]['moduleid']."<br/>"; } } -- GitLab