Skip to content

Commit

Permalink
Merge pull request codeforamerica#99 from pantheon-systems/unify-sett…
Browse files Browse the repository at this point in the history
…ings

Related to #74: Unify settings.php and default.settings.php.
  • Loading branch information
greg-1-anderson committed Nov 4, 2015
2 parents 8e18df8 + 4fc8d03 commit 6419a03
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
17 changes: 14 additions & 3 deletions sites/default/default.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,17 @@
* example.org, with all subdomains included.
*/

/**
* Include the Pantheon-specific settings file.
*
* n.b. The settings.pantheon.php file makes some changes
* that affect all envrionments that this site
* exists in. Always include this file, even in
* a local development environment, to insure that
* the site settings remain consistent.
*/
include __DIR__ . "/settings.pantheon.php";

/**
* Load local development override configuration, if available.
*
Expand All @@ -703,6 +714,6 @@
*
* Keep this code block at the end of this file to take full effect.
*/
# if (file_exists(__DIR__ . '/settings.local.php')) {
# include __DIR__ . '/settings.local.php';
# }
if (file_exists(__DIR__ . '/settings.local.php')) {
include __DIR__ . '/settings.local.php';
}
29 changes: 25 additions & 4 deletions sites/default/settings.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
<?php

/**
* @file
* Drupal site-specific configuration file.
*
* This is the standard settings file provided by default
* for Drupal sites running on the Pantheon platform.
* This file will not be changed in updated versions, so
* you may place your customizations here without causing
* merge conflicts during upgrades.
*
* See default.settings.php for more configuration options.
* You may copy the default.settings.php file over this
* file if you wish.
*/

/**
* Load services definition file.
*/
Expand All @@ -17,9 +32,15 @@
include __DIR__ . "/settings.pantheon.php";

/**
* If there is a local settings file, then include it
* Load local development override configuration, if available.
*
* Use settings.local.php to override variables on secondary (staging,
* development, etc) installations of this site. Typically used to disable
* caching, JavaScript/CSS compression, re-routing of outgoing emails, and
* other things that should not happen on development and testing sites.
*
* Keep this code block at the end of this file to take full effect.
*/
$local_settings = __DIR__ . "/settings.local.php";
if (file_exists($local_settings)) {
include $local_settings;
if (file_exists(__DIR__ . '/settings.local.php')) {
include __DIR__ . '/settings.local.php';
}

0 comments on commit 6419a03

Please sign in to comment.