Skip to content

Commit

Permalink
Merge pull request #394 from dontub/replace-deprecated-setItem-call
Browse files Browse the repository at this point in the history
Replace call of deprecated method `CRM_Core_BAO_Setting::setItem()`
  • Loading branch information
bjendres authored Jan 17, 2025
2 parents 57ea854 + ea14efc commit 74b0b2b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CRM/Banking/Form/AccountsTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ function postProcess() {

// save presets
if (!empty($values['reference_type'])) {
CRM_Core_BAO_Setting::setItem($values['reference_type'], 'CiviBanking', 'account.default_reference_id');
Civi::settings()->set('account.default_reference_id', $values['reference_type']);
}
if (!empty($values['country'])) {
CRM_Core_BAO_Setting::setItem($values['country'], 'CiviBanking', 'account.default_country');
Civi::settings()->set('account.default_country', $values['country']);
}

// create bank account
Expand Down
2 changes: 1 addition & 1 deletion CRM/Banking/Upgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function upgrade_0610() {
* @return TRUE on success
*/
public function upgrade_0611() {
CRM_Core_BAO_Setting::setItem(false, 'org.project60.banking', 'new_ui');
Civi::settings()->set('new_ui', false);

// Update order of the option group banking_tx_status.
$statusApi = civicrm_api3('OptionValue', 'get', array('option_group_id' => 'civicrm_banking.bank_tx_status', 'options' => array('limit' => 0)));
Expand Down
2 changes: 1 addition & 1 deletion banking.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function banking_civicrm_install() {
banking_civicrm_install_options(_banking_options());

// Set the bank account reference probability to 100%.
CRM_Core_BAO_Setting::setItem('1.0', 'CiviBanking', 'reference_matching_probability');
Civi::settings()->set('reference_matching_probability', 1.0);

return _banking_civix_civicrm_install();
}
Expand Down

0 comments on commit 74b0b2b

Please sign in to comment.