Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #345: Changing require_once() to require(). #346

Merged
merged 1 commit into from
Aug 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion template/docroot/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,4 +700,6 @@
*/

// 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';
}
}