Better fix for #22589
This commit is contained in:
parent
47a3a77c81
commit
f2993f7c0f
@ -976,11 +976,10 @@ class MouvementStock extends CommonObject
|
|||||||
if ($origin_type) {
|
if ($origin_type) {
|
||||||
// Separate originetype with "@" : left part is class name, right part is module name
|
// Separate originetype with "@" : left part is class name, right part is module name
|
||||||
$origin_type_array = explode('@', $origin_type);
|
$origin_type_array = explode('@', $origin_type);
|
||||||
$classname = strtolower($origin_type_array[0]);
|
$classname = ucfirst($origin_type_array[0]);
|
||||||
$modulename = empty($origin_type_array[1]) ? $classname : $origin_type_array[1];
|
$modulename = empty($origin_type_array[1]) ? strtolower($classname) : $origin_type_array[1];
|
||||||
$result = dol_include_once('/'.$modulename.'/class/'.strtolower($classname).'.class.php');
|
$result = dol_include_once('/'.$modulename.'/class/'.strtolower($classname).'.class.php');
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$classname = ucfirst($classname);
|
|
||||||
$origin = new $classname($this->db);
|
$origin = new $classname($this->db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user