--- /tmp/dsg/dolibarr/htdocs/contact/canvas/github_19.0.3_actions_contactcard_common.class.php +++ /tmp/dsg/dolibarr/htdocs/contact/canvas/client_actions_contactcard_common.class.php @@ -30,9 +30,9 @@ - /** - * @var DoliDB Database handler. - */ - public $db; - - public $dirmodule; - public $targetmodule; - public $canvas; - public $card; + /** + * @var DoliDB Database handler. + */ + public $db; + + public $dirmodule; + public $targetmodule; + public $canvas; + public $card; @@ -58 +58 @@ - * Get object + * Get object @@ -60,51 +60,48 @@ - * @param int $id Object id - * @return object Object loaded - */ - public function getObject($id) - { - /*$ret = $this->getInstanceDao(); - - if (is_object($this->object) && method_exists($this->object,'fetch')) - { - if (!empty($id)) $this->object->fetch($id); - } - else - {*/ - $object = new Contact($this->db); - if (!empty($id)) { - $object->fetch($id); - } - - $this->object = $object; - - return $object; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Set content of ->tpl array, to use into template - * - * @param string $action Type of action - * @param int $id Id - * @return void - */ - public function assign_values(&$action, $id) - { - // phpcs:enable - global $conf, $langs, $user, $canvas; - global $form, $formcompany, $objsoc; - - if ($action == 'add' || $action == 'update') { - $this->assign_post(); - } - - foreach ($this->object as $key => $value) { - $this->tpl[$key] = $value; - } - - $this->tpl['error'] = $this->error; - $this->tpl['errors'] = $this->errors; - - if ($action == 'create' || $action == 'edit') { - if ($conf->use_javascript_ajax) { - $this->tpl['ajax_selectcountry'] = "\n".'