1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Detect and refresh language file lists when scanning plugin directories.

This commit is contained in:
Cameron
2020-03-03 13:11:48 -08:00
parent eff8293866
commit bc777c7414
2 changed files with 10 additions and 4 deletions

View File

@@ -36,11 +36,12 @@ if(is_array($pref['lan_log_list'])) //... and for any plugins which support it
{ {
foreach($pref['lan_log_list'] as $path => $file) foreach($pref['lan_log_list'] as $path => $file)
{ {
$file = str_replace('--LAN--', e_LANGUAGE, $file); // $file = str_replace('--LAN--', e_LANGUAGE, $file);
// echo "orig = ".$file." ";
//e107::lan($path,'log',true); //e107::lan($path,'log',true);
e107::includeLan(e_PLUGIN.$path.'/languages/'.$file); // e107::includeLan(e_PLUGIN.$path.'/languages/'.$file);
e107::includeLan(e_PLUGIN.$path.'/languages/'.e_LANGUAGE."_log.php");
e107::includeLan(e_PLUGIN.$path.'/languages/'.e_LANGUAGE."/".e_LANGUAGE."_log.php");
} }
} }

View File

@@ -1571,9 +1571,14 @@ class system_tools
$plg->buildAddonPrefLists(); $plg->buildAddonPrefLists();
$plgClass = e107::getPlugin();
foreach($plg->getDetected() as $folder) foreach($plg->getDetected() as $folder)
{ {
$plg->load($folder); $plg->load($folder);
$plgClass->plugFolder = $folder;
$plgClass->XmlLanguageFiles('refresh');
$name = $plg->getName(); $name = $plg->getName();
$addons = $plg->getAddons(); $addons = $plg->getAddons();