From 3dbcd89da1e91f5ac5955b1bb413cbd1ba8506d9 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 15 Aug 2015 04:53:59 -0700 Subject: [PATCH] CRM-16373 - CRM_*_Config - Remove unused component config stuff This code seems to generate default value for domain.config_backend. However, the only one which defined any defaults was CiviMail, and that's now moved over to `settings/`. --- CRM/Campaign/Config.php | 37 -------------------- CRM/Case/Config.php | 38 --------------------- CRM/Contribute/Config.php | 38 --------------------- CRM/Core/Component.php | 16 --------- CRM/Core/Component/Config.php | 64 ----------------------------------- CRM/Core/Component/Info.php | 16 --------- CRM/Core/Config.php | 3 -- CRM/Core/Config/Defaults.php | 10 ------ CRM/Core/Config/Variables.php | 2 ++ CRM/Event/Config.php | 39 --------------------- CRM/Grant/Config.php | 36 -------------------- CRM/Mailing/Config.php | 2 +- CRM/Member/Config.php | 36 -------------------- CRM/Pledge/Config.php | 39 --------------------- CRM/Report/Config.php | 40 ---------------------- 15 files changed, 3 insertions(+), 413 deletions(-) delete mode 100644 CRM/Campaign/Config.php delete mode 100644 CRM/Case/Config.php delete mode 100644 CRM/Contribute/Config.php delete mode 100644 CRM/Core/Component/Config.php delete mode 100644 CRM/Event/Config.php delete mode 100644 CRM/Grant/Config.php delete mode 100644 CRM/Member/Config.php delete mode 100644 CRM/Pledge/Config.php delete mode 100644 CRM/Report/Config.php diff --git a/CRM/Campaign/Config.php b/CRM/Campaign/Config.php deleted file mode 100644 index eee02200ac..0000000000 --- a/CRM/Campaign/Config.php +++ /dev/null @@ -1,37 +0,0 @@ - $comp) { - $cfg = $comp->getConfigObject(); - $cfg->add($config, $oldMode); - } - return NULL; - } - /** * @param string $componentName * diff --git a/CRM/Core/Component/Config.php b/CRM/Core/Component/Config.php deleted file mode 100644 index 8fd866aa94..0000000000 --- a/CRM/Core/Component/Config.php +++ /dev/null @@ -1,64 +0,0 @@ - $value) { - $config->$key = $value; - } - } - - /** - * @param array $defaults - */ - public function setDefaults(&$defaults) { - foreach (get_class_vars(get_class($this)) as $key => $value) { - if (!isset($defaults[$key])) { - $defaults[$key] = $value; - } - } - } - -} diff --git a/CRM/Core/Component/Info.php b/CRM/Core/Component/Info.php index 887af332a9..f2b600c720 100644 --- a/CRM/Core/Component/Info.php +++ b/CRM/Core/Component/Info.php @@ -42,12 +42,6 @@ abstract class CRM_Core_Component_Info { */ const COMPONENT_INVOKE_CLASS = 'Invoke'; - /** - * Name of the class (minus component namespace path) - * of the component configuration class'es name. - */ - const COMPONENT_CONFIG_CLASS = 'Config'; - /** * Name of the class (minus component namespace path) * of the component BAO Query class'es name. @@ -240,16 +234,6 @@ abstract class CRM_Core_Component_Info { return FALSE; } - /** - * Provides component's configuration object. - * - * @return mixed - * component's configuration object - */ - public function getConfigObject() { - return $this->_instantiate(self::COMPONENT_CONFIG_CLASS); - } - /** * Provides component's menu definition object. * diff --git a/CRM/Core/Config.php b/CRM/Core/Config.php index 74be9981bc..0d6e5f80c7 100644 --- a/CRM/Core/Config.php +++ b/CRM/Core/Config.php @@ -440,9 +440,6 @@ class CRM_Core_Config extends CRM_Core_Config_Variables { // retrieve directory and url preferences also CRM_Core_BAO_Setting::retrieveDirectoryAndURLPreferences($variables); - // add component specific settings - $this->componentRegistry->addConfig($this); - // serialise settings $settings = $variables; CRM_Core_BAO_ConfigSetting::add($settings); diff --git a/CRM/Core/Config/Defaults.php b/CRM/Core/Config/Defaults.php index 26d652a709..b21a1f7bf0 100644 --- a/CRM/Core/Config/Defaults.php +++ b/CRM/Core/Config/Defaults.php @@ -187,16 +187,6 @@ class CRM_Core_Config_Defaults { if (isset($_GET[$config->userFrameworkURLVar])) { $args = explode('/', $_GET[$config->userFrameworkURLVar]); } - - if (isset($defaults['enableComponents'])) { - foreach ($defaults['enableComponents'] as $key => $name) { - $comp = $config->componentRegistry->get($name); - if ($comp) { - $co = $comp->getConfigObject(); - $co->setDefaults($defaults); - } - } - } } } diff --git a/CRM/Core/Config/Variables.php b/CRM/Core/Config/Variables.php index 07d34def92..baf6c6f4db 100644 --- a/CRM/Core/Config/Variables.php +++ b/CRM/Core/Config/Variables.php @@ -411,6 +411,8 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults { */ public $wpBasePage = NULL; + public $verpSeparator = '.', $mailThrottleTime = 0, $mailerJobsMax = 0, $mailerJobSize = 0, $mailerBatchLimit = 0; + /** * Provide addressSequence. * diff --git a/CRM/Event/Config.php b/CRM/Event/Config.php deleted file mode 100644 index 5febd35fa0..0000000000 --- a/CRM/Event/Config.php +++ /dev/null @@ -1,39 +0,0 @@ -