Skip to content

Commit

Permalink
Upgrade CiviCRM to version 5.74.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
bugfolder committed Jun 20, 2024
1 parent 202280f commit 6299472
Show file tree
Hide file tree
Showing 2,521 changed files with 177,758 additions and 31,009 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,12 @@ public static function updateCommsPrefByFormValues($contactId, $submittedValues)
]);

$existingPreferredMethod = $apiResult['preferred_communication_method'];

if( !is_array( $existingPreferredMethod ) ){
// create an empty array to avoid error message
$existingPreferredMethod = [];
}

$existingPreferredMethod = array_fill_keys($existingPreferredMethod, 1);
} catch (Exception $e) {
CRM_Core_Error::debug_var('updateCommsPrefByFormValues', $e);
Expand All @@ -540,7 +540,7 @@ public static function updateCommsPrefByFormValues($contactId, $submittedValues)
$name = str_replace($containerPrefix, '', $key);
if (!empty($submittedValues[$key])) {
$channelValue = $submittedValues[$key];
$commPref = array_merge($commPref, $commPrefMapper[$name][$channelValue]);
$commPref = array_merge($commPref, ($commPrefMapper[$name][$channelValue] ?? []));

if ($name == 'post') {
$name = 'postal mail';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function setDefaultValues() {
// If value is missing in the setting, take the corresponding value from the
// group.
foreach($map as $setting_key => $group_key) {
$item[$setting_key] = $item[$setting_key] ?? $grp['frontend_' . $group_key] ?? $grp[$group_key];
$item[$setting_key] = $item[$setting_key] ?? $grp['frontend_' . $group_key] ?? $grp[$group_key] ?? '';
}
// Set default weight.
if (empty($item['group_weight'])) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function preProcess() {
$this->_id = $this->id = $this->_entityId = CRM_Utils_Request::retrieve('id', 'Positive');
$group_id = $this->getGroupId();
if (method_exists('CRM_Custom_Form_CustomData', 'setGroupTree')) {
CRM_Custom_Form_CustomData::setGroupTree($this, '', $group_id, $this->_onlySubtype);
CRM_Custom_Form_CustomData::setGroupTree($this, '', $group_id);
}
else {
// 4.6
Expand All @@ -37,7 +37,7 @@ public function preProcess() {
$this->_groupTree = $formatted_tree;
}
}

/**
* Get the Id of the custom group for terms and conditions.
*/
Expand All @@ -52,7 +52,7 @@ private function getGroupId() {
}
return $this->groupId;
}

/**
* Gets Custom field from the group tree by name.
*/
Expand Down Expand Up @@ -83,7 +83,7 @@ private function getFieldByName($field_name) {
}
return $fields[$field_name] ? $fields[$field_name] : [];
}

/**
* Fetches a Custom Field definition from the API.
*/
Expand Down Expand Up @@ -153,10 +153,10 @@ public function buildQuickForm() {
'Terms & Conditions File'
);
$tc_current = [
'url' => $tc_field['element_value'],
'label' => basename($tc_field['element_value']),
'url' => $tc_field['element_value'] ?? '',
'label' => basename($tc_field['element_value'] ?? ''),
];
$tc_value = $tc_field['element_value'];
$tc_value = $tc_field['element_value'] ?? '';
// Provide some variables so the template can display the upload field in
// place of the link field.
$this->assign('terms_conditions_link_element_name', $tc_field['element_name']);
Expand Down Expand Up @@ -184,7 +184,7 @@ private function versionIs($version) {
}
public function postProcess() {
$this->saveValues();

// Calling parent::endPostProcess() will not direct to the right url since
// this form is not included in the ContributionPage State Machine.
CRM_Core_Session::setStatus(E::ts("Terms & Conditions information has been saved."), E::ts('Saved'), 'success');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ public function buildQuickForm() {
'Terms & Conditions File'
);
$tc_current = [
'url' => $tc_field['element_value'],
'label' => basename($tc_field['element_value']),
'url' => $tc_field['element_value'] ?? '',
'label' => basename($tc_field['element_value'] ?? ''),
];
$tc_value = $tc_field['element_value'];
$tc_value = $tc_field['element_value'] ?? '';
// Provide some variables so the template can display the upload field in
// place of the link field.
$this->assign('terms_conditions_link_element_name', $tc_field['element_name']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class CRM_Gdpr_Hook {
*/
static function alterAnonymizeContactParams(&$params) {
return CRM_Utils_Hook::singleton()
->invoke(1, $params, CRM_Utils_Hook::$_nullObject, CRM_Utils_Hook::$_nullObject, CRM_Utils_Hook::$_nullObject,
->invoke(['params'], $params, CRM_Utils_Hook::$_nullObject, CRM_Utils_Hook::$_nullObject, CRM_Utils_Hook::$_nullObject,
CRM_Utils_Hook::$_nullObject, CRM_Utils_Hook::$_nullObject, 'civicrm_gdpr_alterAnonymizeContactParams');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,16 @@ public function addField($form) {
break;
}
}

$text = $settings['entity_tc_checkbox_text'];
if (!empty($links['entity'])) {
$form->add('checkbox', 'accept_entity_tc', $text, [], TRUE);
}
}
}

if (!empty($links['entity'])) {
$text = $settings['entity_tc_checkbox_text'];
$form->add('checkbox', 'accept_entity_tc', $text, NULL, TRUE);
}

if (!empty($links['global'])) {
$form->add('checkbox', 'accept_tc', CRM_Gdpr_SLA_Utils::getCheckboxText(), [], TRUE);
$form->add('checkbox', 'accept_tc', CRM_Gdpr_SLA_Utils::getCheckboxText(), NULL, TRUE);
}
if (!empty($links)) {
$tc_vars = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/**
* Collection of upgrade steps.
*/
class CRM_Gdpr_Upgrader extends CRM_Gdpr_Upgrader_Base {
class CRM_Gdpr_Upgrader extends CRM_Extension_Upgrader_Base {

// By convention, functions that look like "function upgrade_NNNN()" are
// upgrade tasks. They are executed in order (like Drupal's hook_update_N).
Expand Down
Loading

0 comments on commit 6299472

Please sign in to comment.