From 201d210beb36c138435ea96ecd72469387465a7e Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sun, 16 Aug 2015 18:26:11 -0700 Subject: [PATCH] CRM-16373 - Config - Remove `importDataSourceDir` This variable is a trivial variant on `$civicrm_root`. It does not appear to be editable, and it is only used in one place. --- CRM/Contact/Import/Form/DataSource.php | 4 ++-- CRM/Core/Config/Defaults.php | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/Import/Form/DataSource.php b/CRM/Contact/Import/Form/DataSource.php index 03cdae24e5..f200917225 100644 --- a/CRM/Contact/Import/Form/DataSource.php +++ b/CRM/Contact/Import/Form/DataSource.php @@ -267,8 +267,8 @@ class CRM_Contact_Import_Form_DataSource extends CRM_Core_Form { */ private function _getDataSources() { // Open the data source dir and scan it for class files - $config = CRM_Core_Config::singleton(); - $dataSourceDir = $config->importDataSourceDir; + global $civicrm_root; + $dataSourceDir = $civicrm_root . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'Import' . DIRECTORY_SEPARATOR . 'DataSource' . DIRECTORY_SEPARATOR; $dataSources = array(); if (!is_dir($dataSourceDir)) { CRM_Core_Error::fatal("Import DataSource directory $dataSourceDir does not exist"); diff --git a/CRM/Core/Config/Defaults.php b/CRM/Core/Config/Defaults.php index cd2ff7398b..cb498dec3f 100644 --- a/CRM/Core/Config/Defaults.php +++ b/CRM/Core/Config/Defaults.php @@ -57,8 +57,6 @@ class CRM_Core_Config_Defaults { $this->sqlDir = $civicrm_root . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR; - $this->importDataSourceDir = $civicrm_root . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'Import' . DIRECTORY_SEPARATOR . 'DataSource' . DIRECTORY_SEPARATOR; - // show tree widget $this->groupTree = defined('CIVICRM_GROUPTREE') ? TRUE : FALSE; -- 2.25.1