Skip to content

Commit

Permalink
Fixes #345: Changing require_once() to require().
Browse files Browse the repository at this point in the history
  • Loading branch information
grasmash committed Aug 31, 2016
1 parent 98f20b5 commit b694b62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion template/docroot/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,4 +700,5 @@
*/

// Include BLT configuration.
require_once DRUPAL_ROOT . '/sites/default/settings/blt.settings.php';
// Do not change to require_once(). @see https://github.com/acquia/blt/issues/345
require DRUPAL_ROOT . '/sites/default/settings/blt.settings.php';
18 changes: 9 additions & 9 deletions template/docroot/sites/default/settings/blt.settings.php
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<?php

// Includes required Acquia configuration and set $base_url correctly.
require_once DRUPAL_ROOT . '/sites/default/settings/base.settings.php';
require DRUPAL_ROOT . '/sites/default/settings/base.settings.php';

// Includes caching configuration.
require_once DRUPAL_ROOT . '/sites/default/settings/cache.settings.php';
require DRUPAL_ROOT . '/sites/default/settings/cache.settings.php';

// Includes logging configuration.
require_once DRUPAL_ROOT . '/sites/default/settings/logging.settings.php';
require DRUPAL_ROOT . '/sites/default/settings/logging.settings.php';


/**
* Acquia Cloud settings.
*/
if ($is_ah_env && file_exists('/var/www/site-php')) {
require_once "/var/www/site-php/{$_ENV['AH_SITE_GROUP']}/{$_ENV['AH_SITE_GROUP']}-settings.inc";
require "/var/www/site-php/{$_ENV['AH_SITE_GROUP']}/{$_ENV['AH_SITE_GROUP']}-settings.inc";

// Store API Keys and things outside of version control.
// @see settings/sample-secrets.settings.php for sample code.
$secrets_file = sprintf('/mnt/gfs/%s.%s/secrets.settings.php', $_ENV['AH_SITE_GROUP'], $_ENV['AH_SITE_ENVIRONMENT']);
if (file_exists($secrets_file)) {
require_once $secrets_file;
require $secrets_file;
}
}

Expand All @@ -37,19 +37,19 @@
if ($is_local_env) {
// Load local machine settings.
if (file_exists(DRUPAL_ROOT . '/sites/default/settings/local.settings.php')) {
require_once DRUPAL_ROOT . '/sites/default/settings/local.settings.php';
require DRUPAL_ROOT . '/sites/default/settings/local.settings.php';
}

// Load Acquia Pipeline settings.
if (getenv('PIPELINE_ENV') && file_exists(DRUPAL_ROOT . '/sites/default/settings/pipelines.settings.php')) {
require_once DRUPAL_ROOT . '/sites/default/settings/pipelines.settings.php';
require DRUPAL_ROOT . '/sites/default/settings/pipelines.settings.php';
}
// Load Travis CI settings.
elseif (getenv('TRAVIS') && file_exists(DRUPAL_ROOT . '/sites/default/settings/travis.settings.php')) {
require_once DRUPAL_ROOT . '/sites/default/settings/travis.settings.php';
require DRUPAL_ROOT . '/sites/default/settings/travis.settings.php';
}
// Load Tugboat settings.
elseif (getenv('TUGBOAT_URL') && file_exists(DRUPAL_ROOT . '/sites/default/settings/tugboat.settings.php')) {
require_once DRUPAL_ROOT . '/sites/default/settings/tugboat.settings.php';
require DRUPAL_ROOT . '/sites/default/settings/tugboat.settings.php';
}
}

0 comments on commit b694b62

Please sign in to comment.