From 72d5b85ed7caae4a87cb5895084b388566708841 Mon Sep 17 00:00:00 2001 From: Brett Bieber <brett.bieber@gmail.com> Date: Tue, 5 Oct 2010 20:03:04 +0000 Subject: [PATCH] If a local config file is present, use that, otherwise use the default sample config. --- config.sample.php | 2 +- www/physics/ribbon_cutting2010/index.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config.sample.php b/config.sample.php index fcc8593..eea95ed 100644 --- a/config.sample.php +++ b/config.sample.php @@ -10,7 +10,7 @@ function myautoload($class) } $sendToEmail = ""; //Will send form data to this email address. -$sendFromEmail = ""; //Will send email from this address. +$sendFromEmail = "no-reply@unl.edu"; //Will send email from this address. $emailSubject = "Ribbon Cutting Proposal"; //Subject for the email. spl_autoload_register('myautoload'); diff --git a/www/physics/ribbon_cutting2010/index.php b/www/physics/ribbon_cutting2010/index.php index 7119d97..5511320 100644 --- a/www/physics/ribbon_cutting2010/index.php +++ b/www/physics/ribbon_cutting2010/index.php @@ -2,7 +2,11 @@ /** * TODO: Make page two collums, add graphic of iPad and the new building. **/ -require_once dirname(__FILE__).'/../../../config.inc.php'; +if (file_exists(dirname(__FILE__).'/../../../config.inc.php')) { + require_once dirname(__FILE__).'/../../../config.inc.php'; +} else { + require_once dirname(__FILE__).'/../../../config.sample.php'; +} if (!empty($_POST)) { $mailer = new UNL_WDN_Emailer_Main(); -- GitLab