From 2d2aaad1b06b0bd37b2baf680550fab47622a26e Mon Sep 17 00:00:00 2001 From: fhenry Date: Sun, 16 Dec 2012 23:18:20 +0100 Subject: [PATCH] Manage Extrafields deletion for contact --- htdocs/contact/class/contact.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4fb1e57c9e6..cbdf54dbc8d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -745,6 +745,12 @@ class Contact extends CommonObject $this->error=$this->db->error().' sql='.$sql; } } + + // Removed extrafields + if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) { // For avoid conflicts if trigger used + $result=$this->deleteExtraFields($this); + if ($result < 0) $error++; + } if (! $error && ! $notrigger) {