Merge pull request #3966 from eileenmcnaughton/CRM-15168-all-functions
[civicrm-core.git] / CRM / Admin / Form / Setting / Debugging.php
index 575a65159ca4d81e220a8408b95922740f79989d..6d06f0bfd274a75d1171cc75c366db6c5c8e7c9e 100644 (file)
  */
 class CRM_Admin_Form_Setting_Debugging extends CRM_Admin_Form_Setting {
 
+  protected $_settings = array(
+    'debug_enabled' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
+    'backtrace' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
+    'fatalErrorTemplate' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
+    'fatalErrorHandler' => CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME,
+  );
   /**
    * Function to build the form
    *
@@ -47,16 +53,9 @@ class CRM_Admin_Form_Setting_Debugging extends CRM_Admin_Form_Setting {
    */
   public function buildQuickForm() {
     CRM_Utils_System::setTitle(ts(' Settings - Debugging and Error Handling '));
-
-    $config = CRM_Core_Config::singleton();
-
-    $this->addYesNo('debug', ts('Enable Debugging'));
-    if ($config->userSystem->is_drupal == '1') {
-      $this->addYesNo('userFrameworkLogging', ts('Enable Drupal Watchdog Logging'));
+    if (CRM_Core_Config::singleton()->userSystem->supports_UF_Logging == '1') {
+      $this->_settings['userFrameworkLogging'] = CRM_Core_BAO_Setting::DEVELOPER_PREFERENCES_NAME;
     }
-    $this->addYesNo('backtrace', ts('Display Backtrace'));
-    $this->addElement('text', 'fatalErrorTemplate', ts('Fatal Error Template'));
-    $this->addElement('text', 'fatalErrorHandler', ts('Fatal Error Handler'));
 
     parent::buildQuickForm();
   }