diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 71fe2484dd3..ae33c4e0d78 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -93,8 +93,32 @@ class ActionsContactCardDefault extends ActionsContactCardCommon $this->tpl['actionsdone']=show_actions_done($conf,$langs,$db,$objsoc,$this->object,1); } + + if ($action == 'list') + { + $this->LoadListDatas($GLOBALS['limit'], $GLOBALS['offset'], $GLOBALS['sortfield'], $GLOBALS['sortorder']); + } + } + + /** + * Fetch datas list + * + * @param int $limit Limit number of responses + * @param int $offset Offset for first response + * @param string $sortfield Sort field + * @param string $sortorder Sort order ('ASC' or 'DESC') + * @return void + */ + function LoadListDatas($limit, $offset, $sortfield, $sortorder) + { + global $conf, $langs; + + //$this->getFieldList(); + + $this->list_datas = array(); + } } ?> \ No newline at end of file diff --git a/htdocs/contact/canvas/default/dao_contact_default.class.php b/htdocs/contact/canvas/default/dao_contact_default.class.php index a8fc5715254..dbfab60e45d 100644 --- a/htdocs/contact/canvas/default/dao_contact_default.class.php +++ b/htdocs/contact/canvas/default/dao_contact_default.class.php @@ -27,11 +27,6 @@ */ class DaoContactDefault extends Contact { - var $db; - - //! Numero d'erreur Plage 1280-1535 - var $errno = 0; - /** * Constructor * @@ -42,58 +37,6 @@ class DaoContactDefault extends Contact $this->db = $DB; } - /** - * Create third party in database - * - * @param User $user Object of user that ask creation - * @return int >= 0 if OK, < 0 if KO - */ - function create($user='') - { - $result = parent::create($user); - - return $result; - } - - /** - * Update parameters of third party - * - * @param int $id Id societe - * @param User $user Utilisateur qui demande la mise a jour - * @param int $call_trigger 0=non, 1=oui - * @param int $allowmodcodeclient Inclut modif code client et code compta - * @param int $allowmodcodefournisseur Inclut modif code fournisseur et code compta fournisseur - * @return int <0 if KO, >=0 if OK - */ - function update($id, $user='', $call_trigger=1, $allowmodcodeclient=0, $allowmodcodefournisseur=0) - { - $result = parent::update($id, $user, $call_trigger, $allowmodcodeclient, $allowmodcodefournisseur); - - return $result; - } - - /** - * Delete third party in database - * - * @return int <0 if KO, >=0 if OK - */ - function delete() - { - $result = parent::delete(); - - return $result; - } - - /** - * Fetch datas list - */ - function LoadListDatas($limit, $offset, $sortfield, $sortorder) - { - global $conf, $langs; - - $this->list_datas = array(); - } - } ?> \ No newline at end of file diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 7e17a84272a..10384ca0086 100755 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -28,7 +28,6 @@ include_once(DOL_DOCUMENT_ROOT.'/product/class/product.class.php'); */ class ActionsCardProduct extends Product { - var $db; var $targetmodule; var $canvas; var $card; @@ -38,6 +37,7 @@ class ActionsCardProduct extends Product // List of fiels for action=list var $field_list =array(); + public $list_datas = array(); /** @@ -48,7 +48,7 @@ class ActionsCardProduct extends Product * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function ActionsCardIndividual($DB,$targetmodule,$canvas,$card) + function ActionsCardProduct($DB,$targetmodule,$canvas,$card) { $this->db = $DB; $this->targetmodule = $targetmodule; @@ -64,6 +64,8 @@ class ActionsCardProduct extends Product /** * Return the title of card + * + * @return string Label of card */ private function getTitle() { @@ -75,7 +77,8 @@ class ActionsCardProduct extends Product /** * Assign custom values for canvas (for example into this->tpl to be used by templates) * - * @param action Type of action + * @param string $action Type of action + * @return void */ function assign_values($action) { @@ -141,7 +144,7 @@ class ActionsCardProduct extends Product $this->tpl['accountancySellCodeKey'] = $html->editfieldkey("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,'id',$this->id,$user->rights->produit->creer); $this->tpl['accountancySellCodeVal'] = $html->editfieldval("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,'id',$this->id,$user->rights->produit->creer); } - + $this->tpl['finished'] = $this->object->finished; $this->tpl['ref'] = $this->object->ref; $this->tpl['label'] = $this->object->label; @@ -249,6 +252,8 @@ class ActionsCardProduct extends Product /** * Fetch field list + * + * @return void */ private function getFieldList() { @@ -299,6 +304,12 @@ class ActionsCardProduct extends Product /** * Fetch datas list + * + * @param int $limit Limit number of responses + * @param int $offset Offset for first response + * @param string $sortfield Sort field + * @param string $sortorder Sort order ('ASC' or 'DESC') + * @return void */ function LoadListDatas($limit, $offset, $sortfield, $sortorder) { @@ -372,7 +383,7 @@ class ActionsCardProduct extends Product $sql.= " AND p.canvas = '".$this->db->escape($_GET["canvas"])."'"; } $sql.= $this->db->order($sortfield,$sortorder); - $sql.= $this->db->plimit($limit + 1 ,$offset); + $sql.= $this->db->plimit($limit+1, $offset); //print $sql; $resql = $this->db->query($sql); diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index fb23f213c71..7706a5827db 100755 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -23,12 +23,11 @@ include_once(DOL_DOCUMENT_ROOT.'/product/class/product.class.php'); /** - * \class ProductService + * \class ActionsCardService * \brief Class with controller methods for product canvas */ class ActionsCardService extends Product { - var $db; var $targetmodule; var $canvas; var $card; @@ -38,6 +37,7 @@ class ActionsCardService extends Product // List of fiels for action=list var $field_list =array(); + public $list_datas = array(); /** @@ -48,7 +48,7 @@ class ActionsCardService extends Product * @param string $canvas Name of canvas * @param string $card Name of tab (sub-canvas) */ - function ActionsCardIndividual($DB,$targetmodule,$canvas,$card) + function ActionsCardService($DB,$targetmodule,$canvas,$card) { $this->db = $DB; $this->targetmodule = $targetmodule; @@ -64,6 +64,8 @@ class ActionsCardService extends Product /** * Return the title of card + * + * @return string Label of card */ private function getTitle() { @@ -75,7 +77,8 @@ class ActionsCardService extends Product /** * Assign custom values for canvas (for example into this->tpl to be used by templates) * - * @param action Type of action + * @param string $action Type of action + * @return void */ function assign_values($action) { @@ -141,7 +144,7 @@ class ActionsCardService extends Product $this->tpl['accountancySellCodeKey'] = $html->editfieldkey("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,'id',$this->id,$user->rights->produit->creer); $this->tpl['accountancySellCodeVal'] = $html->editfieldval("ProductAccountancySellCode",'productaccountancycodebuy',$this->accountancy_code_buy,'id',$this->id,$user->rights->produit->creer); } - + $this->tpl['finished'] = $this->object->finished; $this->tpl['ref'] = $this->object->ref; $this->tpl['label'] = $this->object->label; @@ -229,6 +232,8 @@ class ActionsCardService extends Product /** * Fetch field list + * + * @return void */ private function getFieldList() { @@ -277,7 +282,13 @@ class ActionsCardService extends Product } /** - * \brief Fetch datas list + * Fetch datas list + * + * @param int $limit Limit number of responses + * @param int $offset Offset for first response + * @param string $sortfield Sort field + * @param string $sortorder Sort order ('ASC' or 'DESC') + * @return void */ function LoadListDatas($limit, $offset, $sortfield, $sortorder) { @@ -327,7 +338,7 @@ class ActionsCardService extends Product $sql .= " AND cp.fk_categorie = ".$this->db->escape($search_categ); } $sql.= $this->db->order($sortfield,$sortorder); - $sql.= $this->db->plimit($limit + 1 ,$offset); + $sql.= $this->db->plimit($limit+1, $offset); $this->list_datas = array(); diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 226a4553c07..68fd3c1d99f 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -33,8 +33,6 @@ abstract class ActionsCardCommon var $canvas; var $card; - //! Numero d'erreur Plage 1280-1535 - var $errno = 0; //! Template container var $tpl = array(); //! Object container diff --git a/htdocs/societe/canvas/company/actions_card_company.class.php b/htdocs/societe/canvas/company/actions_card_company.class.php index 3f8d828b7b8..9c700bdf1d0 100644 --- a/htdocs/societe/canvas/company/actions_card_company.class.php +++ b/htdocs/societe/canvas/company/actions_card_company.class.php @@ -29,7 +29,6 @@ include_once(DOL_DOCUMENT_ROOT.'/societe/canvas/actions_card_common.class.php'); */ class ActionsCardCompany extends ActionsCardCommon { - var $db; var $targetmodule; var $canvas; var $card; @@ -96,7 +95,7 @@ class ActionsCardCompany extends ActionsCardCommon $this->tpl['profid3'] = $this->object->ape; $this->tpl['profid4'] = $this->object->idprof4; - if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK)) + if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK)) { $js = "\n"; $js.= '