Fix check for non-custom modules
The check turned out to be true even for custom modules, causing the copying of the language file to fail. This attempts to bring the code behaviour in line with the code explaining it.
This commit is contained in:
parent
92b0fde4ca
commit
4fcac5b53c
@ -742,9 +742,9 @@ if ($dirins && $action == 'addlanguage' && !empty($module)) {
|
||||
// Dir for module
|
||||
$diroflang = dol_buildpath($modulelowercase, 0);
|
||||
|
||||
if ($diroflang == $dirread.'/'.$modulelowercase) {
|
||||
if ($diroflang == $dolibarr_main_document_root.'/'.$modulelowercase) {
|
||||
// This is not a custom module, we force diroflang to htdocs root
|
||||
$diroflang = $dirread;
|
||||
$diroflang = $dolibarr_main_document_root;
|
||||
|
||||
$srcfile = $diroflang.'/langs/en_US/'.$modulelowercase.'.lang';
|
||||
$destfile = $diroflang.'/langs/'.$newlangcode.'/'.$modulelowercase.'.lang';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user