diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 3b7cc0d1184..ab0e3c8508a 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1263,7 +1263,12 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (is_array($this->boxes)) { foreach ($this->boxes as $key => $value) { //$titre = $this->boxes[$key][0]; - $file = $this->boxes[$key]['file']; + if (empty($this->boxes[$key]['file'])) { + $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility + } else { + $file = $this->boxes[$key]['file']; + } + //$note = $this->boxes[$key][2]; // TODO If the box is also included by another module and the other module is still on, we should not remove it. @@ -1276,10 +1281,6 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it } } - if (empty($file)) { - $file = isset($this->boxes[$key][1]) ? $this->boxes[$key][1] : ''; // For backward compatibility - } - if ($this->db->type == 'sqlite3') { // sqlite doesn't support "USING" syntax. // TODO: remove this dependency.