Works on canvas integration in third party module
This commit is contained in:
parent
c02dc30b68
commit
0f65e87b16
@ -119,8 +119,8 @@ class Canvas
|
|||||||
$this->canvas = $regs[1];
|
$this->canvas = $regs[1];
|
||||||
|
|
||||||
// For compatibility
|
// For compatibility
|
||||||
if ($this->module == 'thirdparty') $childmodule = $this->aliasmodule = 'societe';
|
if ($childmodule == 'thirdparty') $childmodule = $this->aliasmodule = 'societe';
|
||||||
if ($this->targetmodule == 'thirdparty') $targetmodule = $this->aliastargetmodule = 'societe';
|
if ($targetmodule == 'thirdparty') $targetmodule = 'societe';
|
||||||
}
|
}
|
||||||
|
|
||||||
//print 'childmodule='.$childmodule.' targetmodule='.$targetmodule.'<br>';
|
//print 'childmodule='.$childmodule.' targetmodule='.$targetmodule.'<br>';
|
||||||
@ -139,11 +139,11 @@ class Canvas
|
|||||||
$controlclassfile = DOL_DOCUMENT_ROOT.'/'.$this->aliasmodule.'/canvas/'.$this->canvas.'/'.$this->card.'.'.$this->canvas.'.class.php';
|
$controlclassfile = DOL_DOCUMENT_ROOT.'/'.$this->aliasmodule.'/canvas/'.$this->canvas.'/'.$this->card.'.'.$this->canvas.'.class.php';
|
||||||
include_once($controlclassfile);
|
include_once($controlclassfile);
|
||||||
|
|
||||||
// Instantiate canvas controller class
|
// Instantiate actions class (controller)
|
||||||
$controlclassname = ucfirst($this->card).ucfirst($this->canvas);
|
$controlclassname = ucfirst($this->card).ucfirst($this->canvas);
|
||||||
$this->control = new $controlclassname($this->db);
|
$this->control = new $controlclassname($this->db);
|
||||||
|
|
||||||
// Instantiate model class
|
// Instantiate dataservice class (model)
|
||||||
$modelclassname = ucfirst($this->targetmodule).ucfirst($this->canvas);
|
$modelclassname = ucfirst($this->targetmodule).ucfirst($this->canvas);
|
||||||
$this->control->object = new $modelclassname($this->db);
|
$this->control->object = new $modelclassname($this->db);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user