Skip to content
Snippets Groups Projects
Commit 2eba0895 authored by SNA's avatar SNA
Browse files

evo : include custom lang of modules

parent 8e36f07e
No related branches found
No related tags found
No related merge requests found
......@@ -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/>";
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment