Qual: Removed deprecated code
This commit is contained in:
parent
1d2748106a
commit
05b598a6e6
@ -35,16 +35,16 @@ class Canvas
|
|||||||
var $error;
|
var $error;
|
||||||
var $errors=array();
|
var $errors=array();
|
||||||
|
|
||||||
var $card;
|
|
||||||
var $canvas;
|
|
||||||
var $object;
|
|
||||||
var $control;
|
|
||||||
var $module;
|
|
||||||
var $targetmodule; // Module built into dolibarr replaced by canvas (ex: thirdparty, contact, ...)
|
|
||||||
var $aliasmodule; // Module that provide the canvas
|
|
||||||
var $template_dir; // Directory with all core and external templates files
|
|
||||||
var $action;
|
var $action;
|
||||||
|
|
||||||
|
var $targetmodule; // Module built into dolibarr replaced by canvas (ex: thirdparty, contact, ...)
|
||||||
|
var $canvas; // Name of canvas
|
||||||
|
var $card; // Tab (sub-canvas)
|
||||||
|
|
||||||
|
var $object; // Initialized by getCanvas with dao class
|
||||||
|
var $control; // Initialized by getCanvas with controller class
|
||||||
|
var $template_dir; // Initialized by getCanvas with templates directory
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -72,7 +72,7 @@ class Canvas
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize properties: ->targetmodule, ->card, ->canvas
|
* Initialize properties: ->targetmodule, ->canvas, ->card
|
||||||
* and MVC properties: ->control (Controller), ->control->object (Model), ->template_dir (View)
|
* and MVC properties: ->control (Controller), ->control->object (Model), ->template_dir (View)
|
||||||
* @param module Name of target module (thirdparty, contact, ...)
|
* @param module Name of target module (thirdparty, contact, ...)
|
||||||
* @param card Type of card (ex: card, info, contactcard, ...)
|
* @param card Type of card (ex: card, info, contactcard, ...)
|
||||||
@ -86,8 +86,8 @@ class Canvas
|
|||||||
|
|
||||||
// Set properties with value specific to dolibarr core: this->targetmodule, this->card, this->canvas
|
// Set properties with value specific to dolibarr core: this->targetmodule, this->card, this->canvas
|
||||||
$this->targetmodule = $module;
|
$this->targetmodule = $module;
|
||||||
$this->card = $card;
|
|
||||||
$this->canvas = $canvas;
|
$this->canvas = $canvas;
|
||||||
|
$this->card = $card;
|
||||||
$dirmodule = $module;
|
$dirmodule = $module;
|
||||||
// Correct values if canvas is into an external module
|
// Correct values if canvas is into an external module
|
||||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$canvas,$regs))
|
if (preg_match('/^([^@]+)@([^@]+)$/i',$canvas,$regs))
|
||||||
@ -122,9 +122,10 @@ class Canvas
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Include specific library
|
// Include specific library
|
||||||
// TODO Specific libraries must be included by files that need them only, so by actions and/or dao files.
|
/* Removed because specific libraries must be included by files that need them only, so by actions and/or dao files.
|
||||||
$libfile = dol_buildpath('/'.$dirmodule.'/lib/'.$dirmodule.'.lib.php');
|
$libfile = dol_buildpath('/'.$dirmodule.'/lib/'.$dirmodule.'.lib.php');
|
||||||
if (file_exists($libfile)) require_once($libfile);
|
if (file_exists($libfile)) require_once($libfile);
|
||||||
|
*/
|
||||||
|
|
||||||
// Template dir
|
// Template dir
|
||||||
$this->template_dir = dol_buildpath('/'.$dirmodule.'/canvas/'.$this->canvas.'/tpl/');
|
$this->template_dir = dol_buildpath('/'.$dirmodule.'/canvas/'.$this->canvas.'/tpl/');
|
||||||
@ -132,8 +133,8 @@ class Canvas
|
|||||||
{
|
{
|
||||||
$this->template_dir='';
|
$this->template_dir='';
|
||||||
}
|
}
|
||||||
//print '/'.$dirmodule.'/canvas/'.$this->canvas.'/tpl/';
|
|
||||||
//print 'template_dir='.$this->template_dir.'<br>';
|
//print 'dimodule='.$dirmodule.' canvas='.$this->canvas.' template_dir='.$this->template_dir.'<br>';
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -187,15 +188,6 @@ class Canvas
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the head of card (tabs)
|
|
||||||
*/
|
|
||||||
function showHead()
|
|
||||||
{
|
|
||||||
if (method_exists($this->control,'showHead')) return $this->control->showHead($this->action);
|
|
||||||
else return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assigne les valeurs POST dans l'objet
|
* Assigne les valeurs POST dans l'objet
|
||||||
* // TODO This should be useless. POST is already visible from everywhere.
|
* // TODO This should be useless. POST is already visible from everywhere.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user