CRM-14850 fix admin form to support change from config to setting
authorEileen McNaughton <eileen@fuzion.co.nz>
Sun, 22 Jun 2014 23:35:02 +0000 (11:35 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Sun, 22 Jun 2014 23:35:02 +0000 (11:35 +1200)
CRM/Admin/Form/Setting/Debugging.php

index 575a65159ca4d81e220a8408b95922740f79989d..8871033a8e4cdfe8144afee3fa378ef60d0b7f2b 100644 (file)
  */
 class CRM_Admin_Form_Setting_Debugging extends CRM_Admin_Form_Setting {
 
+  protected $_settings = array(
+    'debug_enabled' => CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME,
+    'backtrace' => CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME,
+    'fatalErrorTemplate' => CRM_Core_BAO_Setting::DIRECTORY_PREFERENCES_NAME,
+    'fatalErrorHandler' => CRM_Core_BAO_Setting::DIRECTORY_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::DIRECTORY_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();
   }