Merge pull request #9575 from jitendrapurohit/CRM-19761
[civicrm-core.git] / api / v3 / Setting.php
index 2817f11643e361d399f5c3868b89eeb05a27e63a..2e4cbb8fc23668b2d0fa4e7fc8d5e77d1bdda50b 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2016                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -113,18 +113,10 @@ function civicrm_api3_setting_getdefaults(&$params) {
   $defaults = array();
   foreach ($domains as $domainID) {
     $defaults[$domainID] = array();
-    $noDefaults = array();
     foreach ($settings['values'] as $setting => $spec) {
       if (array_key_exists('default', $spec) && !is_null($spec['default'])) {
         $defaults[$domainID][$setting] = $spec['default'];
       }
-      else {
-        $noDefaults[$setting] = 1;
-      }
-    }
-    if (!empty($params['debug'])) {
-      // we are only tracking 'noDefaults' to help us check the xml
-      print_r($noDefaults);
     }
   }
   return civicrm_api3_create_success($defaults, $params, 'Setting', 'getfields');
@@ -354,7 +346,7 @@ function civicrm_api3_setting_getvalue($params) {
   //  return $config->$params['name'];
   //}
   return CRM_Core_BAO_Setting::getItem(
-    $params['group'],
+    NULL,
     CRM_Utils_Array::value('name', $params),
     CRM_Utils_Array::value('component_id', $params),
     CRM_Utils_Array::value('default_value', $params),