Fix: Box feature was lost
This commit is contained in:
parent
e519bf0c40
commit
1a0793de91
@ -210,11 +210,11 @@ class InfoBox
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$boxname=preg_replace('/.php$/i','',$obj->file);
|
$boxname=preg_replace('/\.php$/i','',$obj->file);
|
||||||
$sourcefile = DOL_DOCUMENT_ROOT."/core/boxes/".$boxname.".php";
|
$sourcefile = "/core/boxes/".$boxname.".php";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_include_once($sourcefile);
|
dol_include_once($sourcefile); // Do not use dol_include_once here because sourcefile is already good fullpath
|
||||||
if (class_exists($boxname))
|
if (class_exists($boxname))
|
||||||
{
|
{
|
||||||
$box=new $boxname($this->db,$obj->note);
|
$box=new $boxname($this->db,$obj->note);
|
||||||
@ -271,15 +271,15 @@ class InfoBox
|
|||||||
{
|
{
|
||||||
$boxname = $regs[1];
|
$boxname = $regs[1];
|
||||||
$module = $regs[2];
|
$module = $regs[2];
|
||||||
$sourcefile = "/".$module."/core/boxes/".$boxname.".php";
|
$relsourcefile = "/".$module."/core/boxes/".$boxname.".php";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$boxname=preg_replace('/.php$/i','',$obj->file);
|
$boxname=preg_replace('/.php$/i','',$obj->file);
|
||||||
$sourcefile = "/core/boxes/".$boxname.".php";
|
$relsourcefile = "/core/boxes/".$boxname.".php";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_include_once($sourcefile);
|
dol_include_once($relsourcefile);
|
||||||
if (class_exists($boxname))
|
if (class_exists($boxname))
|
||||||
{
|
{
|
||||||
$box=new $boxname($this->db,$obj->note);
|
$box=new $boxname($this->db,$obj->note);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user