Skip to content

Instantly share code, notes, and snippets.

@cam8001
Created February 17, 2014 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cam8001/9049949 to your computer and use it in GitHub Desktop.
Save cam8001/9049949 to your computer and use it in GitHub Desktop.
Patch to add settings.local.php support. Note that this won't work as a patch atm, it's just for reference.
commit f1f7f92eff14a56fd3eec137b4d25f8eae8b139c
Author: Cameron Tod <cameron.tod@gmail.com>
Date: Mon Feb 17 12:32:35 2014 +0000
Added local settings include, to ease debugging of memory issue.
diff --git a/.gitignore b/.gitignore
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@
docroot/files
docroot/sites/*/files
docroot/sites/*/private
+settings.local.php
diff --git a/docroot/sites/default/settings.php b/docroot/sites/default/settings.php
--- a/docroot/sites/default/settings.php
+++ b/docroot/sites/default/settings.php
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
+
+/**
+ * Include a local settings file if it exists.
+ */
+$local_settings = dirname(__FILE__) . '/settings.local.php';
+if (file_exists($local_settings)) {
+ include $local_settings;
+}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment