CRM-16373 - Config - Remove `importDataSourceDir`
authorTim Otten <totten@civicrm.org>
Mon, 17 Aug 2015 01:26:11 +0000 (18:26 -0700)
committerTim Otten <totten@civicrm.org>
Mon, 17 Aug 2015 01:57:50 +0000 (18:57 -0700)
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
CRM/Core/Config/Defaults.php

index 03cdae24e5e0f5a5975a1de91fc555e1ef53ad02..f2009172257dbe18eb8dad138ae1bc3d26508373 100644 (file)
@@ -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");
index cd2ff7398b69e5a14abe6c3f50c96a7138e02656..cb498dec3f2eeaf280ce719e11d6e08a25930a86 100644 (file)
@@ -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;