Skip to content

Commit

Permalink
Replaced calls to settings BAOs with API calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
universalhandle committed Jun 7, 2016
1 parent b812dfa commit cd44ceb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 6 additions & 2 deletions api/v3/VolunteerUtil.php
Expand Up @@ -248,8 +248,12 @@ function civicrm_api3_volunteer_util_getbeneficiaries($params) {
* @return array
*/
function civicrm_api3_volunteer_util_getcampaigns($params) {
$filterType = CRM_Core_BAO_Setting::getItem("org.civicrm.volunteer", "volunteer_general_campaign_filter_type");
$filterList = CRM_Core_BAO_Setting::getItem("org.civicrm.volunteer", "volunteer_general_campaign_filter_list");
$filterType = civicrm_api3('Setting', 'getvalue', array(
'name' => 'volunteer_general_campaign_filter_type',
));
$filterList = civicrm_api3('Setting', 'getvalue', array(
'name' => 'volunteer_general_campaign_filter_list',
));

$campaignParams = array(
"options" => array("limit" => 0),
Expand Down
5 changes: 4 additions & 1 deletion volunteer.slider.php
Expand Up @@ -124,5 +124,8 @@ function _volunteer_update_slider_fields(array $params) {
}

sort($widgetized_fields);
CRM_Core_BAO_Setting::setItem($widgetized_fields, 'CiviVolunteer Configurations', 'slider_widget_fields');
civicrm_api3('Setting', 'create', array(
'slider_widget_fields' => $widgetized_fields,
));

}

0 comments on commit cd44ceb

Please sign in to comment.