aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_module.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_module.php')
-rw-r--r--phpBB/includes/functions_module.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php
index 9226a75d4c..946e7d2b8d 100644
--- a/phpBB/includes/functions_module.php
+++ b/phpBB/includes/functions_module.php
@@ -865,7 +865,7 @@ class p_master
function add_mod_info($module_class)
{
global $user, $phpEx;
-
+/*
if (file_exists($user->lang_path . $user->lang_name . '/mods'))
{
$add_files = array();
@@ -888,6 +888,23 @@ class p_master
{
$user->add_lang($add_files);
}
+ }*/
+
+ global $phpbb_extension_manager;
+
+ $finder = $phpbb_extension_manager->get_finder();
+
+ $lang_files = $finder
+ ->prefix('info_' . strtolower($module_class) . '_')
+ ->suffix(".$phpEx")
+ ->directory('/language/' . $user->lang_name)
+ ->default_path('language/' . $user->lang_name . '/mods/')
+ ->default_directory('')
+ ->find();
+
+ foreach ($lang_files as $lang_file => $ext_name)
+ {
+ $user->add_lang_ext($ext_name, $lang_file);
}
}