From 98350a905949b43164ef154b447ef4e103419ba5 Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Fri, 22 Nov 2013 09:23:34 +0200 Subject: [PATCH] Change import.php to tell user the configuration is missing. --- app/api/import.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/api/import.php b/app/api/import.php index 27151b5..727f72c 100644 --- a/app/api/import.php +++ b/app/api/import.php @@ -9,7 +9,14 @@ * @link https://github.com/Ekokumppanit/Lentolaskuri */ -require_once 'config.php'; +/** + * See if we have config.php + */ +if (is_readable('config.php')) { + include_once 'config.php'; +} else { + die("Couldn't find configuration file. Please check the installation guide."); +} // If we can see lentolaskuri.sql and config.php setting // $config['create_table'] is true, we try to create table for airports.