mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX #11244
This commit is contained in:
parent
3c05cfe690
commit
912e29a746
|
|
@ -3716,16 +3716,10 @@ 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 $module => $reldir)
|
||||
foreach($dirtpls as $reldir)
|
||||
{
|
||||
if (!empty($module))
|
||||
{
|
||||
$tpl = dol_buildpath($reldir.'/objectline_create.tpl.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_create.tpl.php';
|
||||
}
|
||||
$tpl = dol_buildpath($reldir.'/objectline_create.tpl.php');
|
||||
|
||||
if (empty($conf->file->strict_mode)) {
|
||||
$res=@include $tpl;
|
||||
} else {
|
||||
|
|
@ -3975,16 +3969,10 @@ 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 $module => $reldir)
|
||||
foreach($dirtpls as $reldir)
|
||||
{
|
||||
if (!empty($module))
|
||||
{
|
||||
$tpl = dol_buildpath($reldir.'/objectline_view.tpl.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_view.tpl.php';
|
||||
}
|
||||
$tpl = dol_buildpath($reldir.'/objectline_view.tpl.php');
|
||||
|
||||
if (empty($conf->file->strict_mode)) {
|
||||
$res=@include $tpl;
|
||||
} else {
|
||||
|
|
@ -4005,16 +3993,10 @@ 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 $module => $reldir)
|
||||
foreach($dirtpls as $reldir)
|
||||
{
|
||||
if (!empty($module))
|
||||
{
|
||||
$tpl = dol_buildpath($reldir.'/objectline_edit.tpl.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_edit.tpl.php';
|
||||
}
|
||||
$tpl = dol_buildpath($reldir.'/objectline_edit.tpl.php');
|
||||
|
||||
if (empty($conf->file->strict_mode)) {
|
||||
$res=@include $tpl;
|
||||
} else {
|
||||
|
|
@ -4208,16 +4190,10 @@ 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 $module => $reldir)
|
||||
foreach($dirtpls as $reldir)
|
||||
{
|
||||
if (!empty($module))
|
||||
{
|
||||
$tpl = dol_buildpath($reldir.'/originproductline.tpl.php');
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/originproductline.tpl.php';
|
||||
}
|
||||
$tpl = dol_buildpath($reldir.'/originproductline.tpl.php');
|
||||
|
||||
if (empty($conf->file->strict_mode)) {
|
||||
$res=@include $tpl;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -383,13 +383,19 @@ if ((! defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && ! empty($conf->
|
|||
if (GETPOST('disablemodules','alpha')) $_SESSION["disablemodules"]=GETPOST('disablemodules','alpha');
|
||||
if (! empty($_SESSION["disablemodules"]))
|
||||
{
|
||||
$disabled_modules=explode(',',$_SESSION["disablemodules"]);
|
||||
$modulepartkeys = array('css', 'js', 'tabs', 'triggers', 'login', 'substitutions', 'menus', 'theme', 'sms', 'tpl', 'barcode', 'models', 'societe', 'hooks', 'dir', 'syslog', 'tpllinkable', 'contactelement', 'moduleforexternal');
|
||||
|
||||
$disabled_modules=explode(',',$_SESSION["disablemodules"]);
|
||||
foreach($disabled_modules as $module)
|
||||
{
|
||||
if ($module)
|
||||
{
|
||||
if (empty($conf->$module)) $conf->$module=new stdClass();
|
||||
if (empty($conf->$module)) $conf->$module=new stdClass(); // To avoid warnings
|
||||
$conf->$module->enabled=false;
|
||||
foreach($modulepartkeys as $modulepartkey)
|
||||
{
|
||||
unset($conf->modules_parts[$modulepartkey][$module]);
|
||||
}
|
||||
if ($module == 'fournisseur') // Special case
|
||||
{
|
||||
$conf->supplier_order->enabled=0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user