From 087b026f54d06332326ef6ddc01c4944628444bc Mon Sep 17 00:00:00 2001 From: phf Date: Tue, 26 May 2015 12:40:49 +0200 Subject: [PATCH] Add fetch extrafields in contact's fetch function --- htdocs/contact/class/contact.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index e2118a9dbaa17..63204d158cc26 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -628,6 +628,13 @@ function fetch($id, $user=0, $ref_ext='') } } + // Retreive all extrafield for contact + // fetch optionals attributes and labels + require_once(DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'); + $extrafields=new ExtraFields($this->db); + $extralabels=$extrafields->fetch_name_optionals_label($this->table_element,true); + $this->fetch_optionals($this->id,$extralabels); + return 1; } else