X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fdb%2Fcrm_contacts_db.inc;h=3b47790fb313b851fb289d9cf16469157eecc750;hb=7840540918bfd37c886877a5d52e3ba0b3373289;hp=3f34b70e7d75ba2f4ecd5b3bf8aeee62da07b878;hpb=7b398ba8033a22ceaf057692ea3b5338c8bd3ea7;p=fa-stable.git diff --git a/includes/db/crm_contacts_db.inc b/includes/db/crm_contacts_db.inc index 3f34b70e..3b47790f 100644 --- a/includes/db/crm_contacts_db.inc +++ b/includes/db/crm_contacts_db.inc @@ -150,6 +150,9 @@ function update_person_contacts($id, $cat_ids, $entity_id=null) $ret = db_query($sql, "Can't delete person contacts"); + foreach($cat_ids as $n => $cid) + $cat_ids[$n] = db_escape($cid); + if($ret && count($cat_ids)) { array_walk($cat_ids,'db_escape'); $sql = "INSERT INTO ".TB_PREF."crm_contacts (person_id,type,action,entity_id)