Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace call of deprecated method CRM_Core_BAO_Setting::setItem() #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CRM/Banking/Form/AccountsTab.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,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