From 4d6db63f081bc39fc5ff57728422ecc869214705 Mon Sep 17 00:00:00 2001 From: Brett Bieber <brett.bieber@gmail.com> Date: Fri, 7 Sep 2012 08:10:58 -0500 Subject: [PATCH] Allow a local config file --- .gitignore | 1 + www/index.php | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0433613 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/config.inc.php diff --git a/www/index.php b/www/index.php index a7291fe..4996ff5 100644 --- a/www/index.php +++ b/www/index.php @@ -1,6 +1,11 @@ <?php -require_once dirname(__FILE__).'/../config.sample.php'; +$config_file = __DIR__ . '/../config.sample.php'; + +if (file_exists(__DIR__ . '/../config.inc.php')) { + $config_file = __DIR__ . '/../config.inc.php'; +} +require_once $config_file; UNL_Templates::setCachingService(new UNL_Templates_CachingService_Null()); -- GitLab