CRM-15766 - Fix settings form wrongly adding everything to config
authorColeman Watts <coleman@civicrm.org>
Tue, 30 Dec 2014 15:12:36 +0000 (10:12 -0500)
committerColeman Watts <coleman@civicrm.org>
Tue, 30 Dec 2014 15:12:36 +0000 (10:12 -0500)
CRM/Admin/Form/Setting/Miscellaneous.php

index d96f9a63cb90fb771b388880fa47e9c06f0ae6de..cf0bea74ee358818d749d076d77e7fdf69c5b56f 100644 (file)
@@ -158,9 +158,12 @@ class CRM_Admin_Form_Setting_Miscellaneous extends CRM_Admin_Form_Setting {
     $config = CRM_Core_Config::singleton();
     $params = $this->controller->exportValues($this->_name);
 
-    // update upload max size in DB
-    $params['maxImportFileSize'] = CRM_Core_Config_Defaults::formatUnitSize(ini_get('upload_max_filesize'));
-    CRM_Core_BAO_ConfigSetting::create($params);
+    // update upload max size in $config
+    // Fixme: why are we storing this php setting in $config?
+    $hiddenSettings = array(
+      'maxImportFileSize' => CRM_Core_Config_Defaults::formatUnitSize(ini_get('upload_max_filesize'))
+    );
+    CRM_Core_BAO_ConfigSetting::create($hiddenSettings);
 
     // get current logging status
     $values = $this->exportValues();