Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0

This commit is contained in:
Laurent Destailleur 2019-05-29 10:36:00 +02:00
commit b46b675b7c

View File

@ -3806,10 +3806,19 @@ abstract class CommonObject
// Output template part (modules that overwrite templates must declare this into descriptor)
// Use global variables + $dateSelector + $seller and $buyer
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
foreach($dirtpls as $reldir)
$dirtpls=array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
foreach($dirtpls as $module => $reldir)
{
$tpl = dol_buildpath($reldir.'/objectline_create.tpl.php');
if (!empty($module) && empty($conf->$module->enabled)) continue;
if (!empty($module))
{
$tpl = dol_buildpath($reldir.'/objectline_create.tpl.php');
}
else
{
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_create.tpl.php';
}
if (empty($conf->file->strict_mode)) {
$res=@include $tpl;
} else {
@ -4059,10 +4068,19 @@ abstract class CommonObject
// Output template part (modules that overwrite templates must declare this into descriptor)
// Use global variables + $dateSelector + $seller and $buyer
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
foreach($dirtpls as $reldir)
$dirtpls=array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
foreach($dirtpls as $module => $reldir)
{
$tpl = dol_buildpath($reldir.'/objectline_view.tpl.php');
if (!empty($module) && empty($conf->$module->enabled)) continue;
if (!empty($module))
{
$tpl = dol_buildpath($reldir.'/objectline_view.tpl.php');
}
else
{
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_view.tpl.php';
}
if (empty($conf->file->strict_mode)) {
$res=@include $tpl;
} else {
@ -4082,10 +4100,19 @@ abstract class CommonObject
// Output template part (modules that overwrite templates must declare this into descriptor)
// Use global variables + $dateSelector + $seller and $buyer
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
foreach($dirtpls as $reldir)
$dirtpls=array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
foreach($dirtpls as $module => $reldir)
{
$tpl = dol_buildpath($reldir.'/objectline_edit.tpl.php');
if (!empty($module) && empty($conf->$module->enabled)) continue;
if (!empty($module))
{
$tpl = dol_buildpath($reldir.'/objectline_edit.tpl.php');
}
else
{
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_edit.tpl.php';
}
if (empty($conf->file->strict_mode)) {
$res=@include $tpl;
} else {
@ -4278,10 +4305,19 @@ abstract class CommonObject
// Output template part (modules that overwrite templates must declare this into descriptor)
// Use global variables + $dateSelector + $seller and $buyer
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl'));
foreach($dirtpls as $reldir)
$dirtpls=array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
foreach($dirtpls as $module => $reldir)
{
$tpl = dol_buildpath($reldir.'/originproductline.tpl.php');
if (!empty($module) && empty($conf->$module->enabled)) continue;
if (!empty($module))
{
$tpl = dol_buildpath($reldir.'/originproductline.tpl.php');
}
else
{
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/originproductline.tpl.php';
}
if (empty($conf->file->strict_mode)) {
$res=@include $tpl;
} else {