From 1a0793de917afab448759159f822e6eb8f36f9f9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Feb 2012 20:17:19 +0100 Subject: [PATCH] Fix: Box feature was lost --- htdocs/boxes.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/boxes.php b/htdocs/boxes.php index 77c63b8bce1..c83a37ef87e 100644 --- a/htdocs/boxes.php +++ b/htdocs/boxes.php @@ -210,11 +210,11 @@ class InfoBox } else { - $boxname=preg_replace('/.php$/i','',$obj->file); - $sourcefile = DOL_DOCUMENT_ROOT."/core/boxes/".$boxname.".php"; + $boxname=preg_replace('/\.php$/i','',$obj->file); + $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)) { $box=new $boxname($this->db,$obj->note); @@ -271,15 +271,15 @@ class InfoBox { $boxname = $regs[1]; $module = $regs[2]; - $sourcefile = "/".$module."/core/boxes/".$boxname.".php"; + $relsourcefile = "/".$module."/core/boxes/".$boxname.".php"; } else { $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)) { $box=new $boxname($this->db,$obj->note);