mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Removed useless code
This commit is contained in:
parent
db250f892d
commit
9d12daef9f
|
|
@ -220,7 +220,7 @@ function societe_admin_prepare_head($object)
|
|||
* @param DoliDB $dbtouse Database handler (using in global way may fail because of conflicts with some autoload features)
|
||||
* @param Translate $outputlangs Langs object for output translation
|
||||
* @param int $entconv 0=Return value without entities and not converted to output charset
|
||||
* @return string String with country code or translated country name
|
||||
* @return mixed String with country code or translated country name or Array('id','code','label')
|
||||
*/
|
||||
function getCountry($id,$withcode='',$dbtouse=0,$outputlangs='',$entconv=1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,35 +60,9 @@ class ActionsCardProduct extends Product
|
|||
$this->name = "product";
|
||||
$this->definition = "Product canvas (défaut)";
|
||||
$this->fieldListName = "product_default";
|
||||
|
||||
$this->next_prev_filter = "canvas='default'";
|
||||
$this->next_prev_filter = "canvas='product'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the title of card
|
||||
*
|
||||
* @return string Label of card
|
||||
*/
|
||||
private function getTitle()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
return $langs->trans("Products");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get object from id or ref and save it into this->object
|
||||
*
|
||||
* @param int $id Object id
|
||||
* @param string $ref Ojbect ref
|
||||
* @return Object Object loaded
|
||||
*/
|
||||
function getObject($id,$ref='')
|
||||
{
|
||||
$object = new Product($this->db);
|
||||
if (! empty($id) || ! empty($ref)) $object->fetch($id,$ref);
|
||||
$this->object = $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign custom values for canvas (for example into this->tpl to be used by templates)
|
||||
|
|
@ -103,7 +77,9 @@ class ActionsCardProduct extends Product
|
|||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $html, $formproduct;
|
||||
|
||||
$ret = $this->getObject($id,$ref);
|
||||
$tmpobject = new Product($this->db);
|
||||
if (! empty($id) || ! empty($ref)) $tmpobject->fetch($id,$ref);
|
||||
$this->object = $object;
|
||||
|
||||
//parent::assign_values($action);
|
||||
|
||||
|
|
|
|||
|
|
@ -62,32 +62,6 @@ class ActionsCardService extends Product
|
|||
$this->next_prev_filter = "canvas='service'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the title of card
|
||||
*
|
||||
* @return string Label of card
|
||||
*/
|
||||
private function getTitle()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
return $langs->trans("Products");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get object from id or ref and save it into this->object
|
||||
*
|
||||
* @param int $id Object id
|
||||
* @param string $ref Ojbect ref
|
||||
* @return Object Object loaded
|
||||
*/
|
||||
function getObject($id,$ref='')
|
||||
{
|
||||
$object = new Product($this->db);
|
||||
if (! empty($id) || ! empty($ref)) $object->fetch($id,$ref);
|
||||
$this->object = $object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign custom values for canvas (for example into this->tpl to be used by templates)
|
||||
|
|
@ -102,7 +76,9 @@ class ActionsCardService extends Product
|
|||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $html, $formproduct;
|
||||
|
||||
$ret = $this->getObject($id,$ref);
|
||||
$tmpobject = new Product($this->db);
|
||||
if (! empty($id) || ! empty($ref)) $tmpobject->fetch($id,$ref);
|
||||
$this->object = $object;
|
||||
|
||||
//parent::assign_values($action);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user