From f2d0bfa0a036c025ce56c635d81997c84080c74b Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Sun, 27 Apr 2014 17:38:00 -0700 Subject: [PATCH] comments & whitespace tidy ups --- CRM/Contact/BAO/Contact.php | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/CRM/Contact/BAO/Contact.php b/CRM/Contact/BAO/Contact.php index 236b3630f2..cf82d7e8eb 100644 --- a/CRM/Contact/BAO/Contact.php +++ b/CRM/Contact/BAO/Contact.php @@ -252,10 +252,13 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact { * * This function is invoked from within the web form layer and also from the api layer * - * @param array $params (reference ) an assoc array of name/value pairs - * @param boolean $fixAddress if we need to fix address + * @param array $params (reference ) an assoc array of name/value pairs + * @param boolean $fixAddress if we need to fix address * @param boolean $invokeHooks if we need to invoke hooks * + * @param bool $skipDelete + * + * @throws Exception * @return object CRM_Contact_BAO_Contact object * @access public * @static @@ -450,6 +453,8 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact { * * @param int $id the contactId * + * @param bool $type + * * @return array the displayName and contactImage for this contact * @access public * @static @@ -2070,7 +2075,7 @@ ORDER BY civicrm_email.is_primary DESC"; if (($session->get('authSrc') & (CRM_Core_Permission::AUTH_SRC_CHECKSUM + CRM_Core_Permission::AUTH_SRC_LOGIN)) == 0 && ($value == '' || !isset($value))) { continue; - } + } $valueId = NULL; if (!empty($params['customRecordValues'])) { @@ -2127,21 +2132,21 @@ ORDER BY civicrm_email.is_primary DESC"; } } } - else if (in_array($key, - array('nick_name', - 'job_title', - 'middle_name', - 'birth_date', + else if (in_array($key, + array('nick_name', + 'job_title', + 'middle_name', + 'birth_date', 'gender_id', - 'current_employer', - 'prefix_id', + 'current_employer', + 'prefix_id', 'suffix_id')) && ($value == '' || !isset($value)) && ($session->get('authSrc') & (CRM_Core_Permission::AUTH_SRC_CHECKSUM + CRM_Core_Permission::AUTH_SRC_LOGIN)) == 0) { - // CRM-10128: if auth source is not checksum / login && $value is blank, do not fill $data with empty value + // CRM-10128: if auth source is not checksum / login && $value is blank, do not fill $data with empty value // to avoid update with empty values continue; - } + } else { $data[$key] = $value; } -- 2.25.1