Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
9512865896
@ -1689,7 +1689,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||||||
|
|
||||||
// Global js function
|
// Global js function
|
||||||
print '<!-- Includes JS of Dolibarr -->'."\n";
|
print '<!-- Includes JS of Dolibarr -->'."\n";
|
||||||
print '<script src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext ? '&'.$ext : '').'"></script>'."\n";
|
print '<script src="'.DOL_URL_ROOT.'/core/js/lib_head.js.php?lang='.$langs->defaultlang.($ext ? '&'.$ext : '').'"></script>'."\n";
|
||||||
|
|
||||||
// JS forced by modules (relative url starting with /)
|
// JS forced by modules (relative url starting with /)
|
||||||
if (!empty($conf->modules_parts['js'])) { // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))
|
if (!empty($conf->modules_parts['js'])) { // $conf->modules_parts['js'] is array('module'=>array('file1','file2'))
|
||||||
@ -1698,7 +1698,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||||||
$filesjs = (array) $filesjs; // To be sure filejs is an array
|
$filesjs = (array) $filesjs; // To be sure filejs is an array
|
||||||
foreach ($filesjs as $jsfile) {
|
foreach ($filesjs as $jsfile) {
|
||||||
// jsfile is a relative path
|
// jsfile is a relative path
|
||||||
print '<!-- Include JS added by module '.$modjs.'-->'."\n".'<script src="'.dol_buildpath($jsfile, 1).'"></script>'."\n";
|
print '<!-- Include JS added by module '.$modjs.'-->'."\n".'<script src="'.dol_buildpath($jsfile, 1).((strpos($jsfile, '?') === false) ? '?' : '&').'lang='.$langs->defaultlang.'"></script>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1707,9 +1707,9 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||||||
print '<!-- Includes JS added by page -->'."\n";
|
print '<!-- Includes JS added by page -->'."\n";
|
||||||
foreach ($arrayofjs as $jsfile) {
|
foreach ($arrayofjs as $jsfile) {
|
||||||
if (preg_match('/^(http|\/\/)/i', $jsfile)) {
|
if (preg_match('/^(http|\/\/)/i', $jsfile)) {
|
||||||
print '<script src="'.$jsfile.($ext ? ((strpos($jsfile, '?') === false) ? '?' : '&').$ext : '').'"></script>'."\n";
|
print '<script src="'.$jsfile.((strpos($jsfile, '?') === false) ? '?' : '&').'lang='.$langs->defaultlang.'"></script>'."\n";
|
||||||
} else {
|
} else {
|
||||||
print '<script src="'.dol_buildpath($jsfile, 1).($ext ? ((strpos($jsfile, '?') === false) ? '?' : '&').$ext : '').'"></script>'."\n";
|
print '<script src="'.dol_buildpath($jsfile, 1).((strpos($jsfile, '?') === false) ? '?' : '&').'lang='.$langs->defaultlang.'"></script>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user