From: kurund Date: Mon, 14 Jul 2014 09:29:02 +0000 (+0530) Subject: Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-07-14-13-42-39 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3838662faff56daff7b4fbbd25c60a4b7242a484;p=civicrm-core.git Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-07-14-13-42-39 Conflicts: CRM/Contact/BAO/Contact.php CRM/Contact/BAO/Contact/Utils.php --- 3838662faff56daff7b4fbbd25c60a4b7242a484 diff --cc CRM/Contact/BAO/Contact.php index 54fe7206ce,07f9ae2c0e..f545f04b78 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@@ -233,14 -223,19 +233,15 @@@ class CRM_Contact_BAO_Contact extends C ); } - if ($contact->contact_type == 'Individual' && - (isset($params['current_employer']) || - isset($params['employer_id']) - ) - ) { + if ($contact->contact_type == 'Individual' && (isset($params['current_employer']) || isset($params['employer_id']))) { - $newEmployer = !empty($params['employer_id']) ? $params['employer_id'] : CRM_Utils_Array::value('current_employer', $params); // create current employer + $newEmployer = !empty($params['employer_id']) ? $params['employer_id'] : CRM_Utils_Array::value('current_employer', $params); + + $newContact = FALSE; + if (empty($params['contact_id'])) { + $newContact = TRUE; + } if ($newEmployer) { - $newContact = FALSE; - if (empty($params['contact_id'])) { - $newContact = TRUE; - } CRM_Contact_BAO_Contact_Utils::createCurrentEmployerRelationship($contact->id, $newEmployer, $employerId, $newContact); } else {