From c368ff69dff781755a8ed2227af78f34b881e2d6 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 8 Jun 2022 12:36:55 +0200 Subject: [PATCH] New : add of socialmedias in contact update --- htdocs/core/modules/modSociete.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index 322988e7a7b..4b09207283f 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -834,6 +834,15 @@ class modSociete extends DolibarrModules $this->import_updatekeys_array[$r] = array( 's.rowid' => 'Id' ); + if (!empty($conf->socialnetworks->enabled)) { + $sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_socialnetworks WHERE active = 1"; + $resql = $this->db->query($sql); + while ($obj = $this->db->fetch_object($resql)) { + $fieldname = 's.socialnetworks_'.$obj->code; + $fieldlabel = ucfirst($obj->label); + $this->import_updatekeys_array[$r][$fieldname] = $fieldlabel; + } + } // Import Bank Accounts $r++;