CRM_Extension_System::singleton()->getManager()->getStatuses(),
PREG_GREP_INVERT
),
- 'domains' => CRM_Core_DAO::singleValueQuery('SELECT count(*) FROM civicrm_domain'),
- 'languageLimit' => CRM_Core_Config::singleton()->languageLimit,
- 'lcMessages' => CRM_Core_Config::singleton()->lcMessages,
+ 'multidomain' => CRM_Core_DAO::singleValueQuery('SELECT count(*) FROM civicrm_domain') > 1,
+ 'settings' => _civicrm_api3_system_get_redacted_settings(),
'exampleUrl' => CRM_Utils_System::url('civicrm/example', NULL, TRUE, NULL, FALSE),
),
'http' => array(
return $result;
}
+function _civicrm_api3_system_get_redacted_settings() {
+ static $whitelist = NULL;
+ if ($whitelist === NULL) {
+ $whitelist = _civicrm_api3_system_get_whitelist(__DIR__ . '/System/setting-whitelist.txt');
+ }
+
+ $apiResult = civicrm_api3('Setting', 'get', array());
+ $result = array();
+ foreach ($apiResult['values'] as $settings) {
+ foreach ($settings as $key => $value) {
+ if (in_array($key, $whitelist)) {
+ $result[$key] = $value;
+ }
+ }
+ }
+
+ return $result;
+}
+
/**
* Read a whitelist.
*
--- /dev/null
+## As a rule of thumb, we include booleans/integer/enum settings
+## but omit free-form settings which could include identifying info.
+ajaxPopupsEnabled
+allowPermDeleteFinancial
+backtrace
+civimail_multiple_bulk_emails
+civimail_server_wide_lock
+civimail_workflow
+contact_ajax_check_similar
+contact_undelete
+debug_enabled
+disable_core_css
+disable_mandatory_tokens_check
+editor_id
+enableSSL
+enable_cart
+enable_innodb_fts
+fts_query_mode
+includeAlphabeticalPager
+includeEmailInName
+includeNickNameInName
+includeOrderByClause
+includeWildCardInName
+inheritLocale
+languageLimit
+lcMessages
+legacyEncoding
+logging
+mailThrottleTime
+mailerBatchLimit
+mailerJobSize
+mailerJobsMax
+maxFileSize
+max_attachments
+replyTo
+secondDegRelPermissions
+securityAlert
+smartGroupCacheTimeout
+track_civimail_replies
+uniq_email_per_site
+verifySSL