From 44119719b84c60d667f970c4a6a93ce746af95ee Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 3 Nov 2010 16:12:41 +0000 Subject: [PATCH] Works on contact canvas in relation to the thirdparty canvas module --- htdocs/contact/canvas/actions_contactcard_common.class.php | 6 ++++-- htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index dfecc6f2af0..300dcdb67f1 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -178,8 +178,10 @@ class ActionsContactCardCommon { $this->tpl['showrefnav'] = $form->showrefnav($this->object,'id'); - if (is_object($objsoc) && $this->object->socid > 0) + if ($this->object->socid > 0) { + $objsoc = new Societe($this->db); + $objsoc->fetch($this->object->socid); $this->tpl['company'] = $objsoc->getNomUrl(1); } @@ -351,7 +353,7 @@ class ActionsContactCardCommon $_GET["action"] = $_POST["action"] = 'edit'; } - if (! sizeof($errors)) + if (empty($errors)) { $this->object->fetch($_POST["contactid"]); diff --git a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php index 9bf2e2e90ab..b5df126519a 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_edit.tpl.php @@ -29,9 +29,9 @@ "> - - - + + + control->tpl['company_id']) { ?>