Merge pull request #15329 from mattwire/contributepagetab_cleanupstatic
[civicrm-core.git] / CRM / Core / Config / Runtime.php
index d1aef183d9b706cb897dd80aaf68a4d3945d085a..da2abcec7b759fb6adc68a4b1424de4dfec42f63 100644 (file)
@@ -73,13 +73,6 @@ class CRM_Core_Config_Runtime extends CRM_Core_Config_MagicMerge {
    */
   public $cleanURL;
 
-  /**
-   * @var string
-   */
-  public $configAndLogDir;
-
-  public $templateCompileDir;
-
   /**
    * The root directory of our template tree.
    * @var string
@@ -95,20 +88,6 @@ class CRM_Core_Config_Runtime extends CRM_Core_Config_MagicMerge {
     }
     $this->dsn = defined('CIVICRM_DSN') ? CIVICRM_DSN : NULL;
 
-    if (!defined('CIVICRM_TEMPLATE_COMPILEDIR') && $loadFromDB) {
-      $this->fatal('You need to define CIVICRM_TEMPLATE_COMPILEDIR in civicrm.settings.php');
-    }
-
-    if (defined('CIVICRM_TEMPLATE_COMPILEDIR')) {
-      $this->configAndLogDir = CRM_Utils_File::baseFilePath() . 'ConfigAndLog' . DIRECTORY_SEPARATOR;
-      CRM_Utils_File::createDir($this->configAndLogDir);
-      CRM_Utils_File::restrictAccess($this->configAndLogDir);
-
-      $this->templateCompileDir = defined('CIVICRM_TEMPLATE_COMPILEDIR') ? CRM_Utils_File::addTrailingSlash(CIVICRM_TEMPLATE_COMPILEDIR) : NULL;
-      CRM_Utils_File::createDir($this->templateCompileDir);
-      CRM_Utils_File::restrictAccess($this->templateCompileDir);
-    }
-
     if (!defined('CIVICRM_UF')) {
       $this->fatal('You need to define CIVICRM_UF in civicrm.settings.php');
     }
@@ -184,6 +163,8 @@ class CRM_Core_Config_Runtime extends CRM_Core_Config_MagicMerge {
         \CRM_Utils_Array::value('HTTP_HOST', $_SERVER, ''),
         // e.g. port-based vhosts
         \CRM_Utils_Array::value('SERVER_PORT', $_SERVER, ''),
+        // e.g. unit testing
+        defined('CIVICRM_TEST') ? 1 : 0,
         // Depending on deployment arch, these signals *could* be redundant, but who cares?
       ]));
     }