From 9d706d7125cd42e4ff62f5e78ac3af37ebde5f23 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Thu, 5 Nov 2015 20:30:54 +0100 Subject: [PATCH] Fixes #79 --- src/application/controllers/installation.php | 2 +- src/assets/js/installation.js | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/application/controllers/installation.php b/src/application/controllers/installation.php index 03cfca81..9f0195ad 100644 --- a/src/application/controllers/installation.php +++ b/src/application/controllers/installation.php @@ -66,7 +66,7 @@ class Installation extends CI_Controller { } // Create E!A database structure. - $file_contents = file_get_contents(BASEPATH . 'assets/sql/structure.sql'); + $file_contents = file_get_contents(dirname(BASEPATH) . '/assets/sql/structure.sql'); $sql_queries = explode(';', $file_contents); array_pop($sql_queries); foreach($sql_queries as $query) { diff --git a/src/assets/js/installation.js b/src/assets/js/installation.js index 9d1fb242..d8052ce2 100644 --- a/src/assets/js/installation.js +++ b/src/assets/js/installation.js @@ -47,14 +47,12 @@ $(document).ready(function() { if (!GeneralFunctions.handleAjaxExceptions(response)) return; - if (response == AJAX_SUCCESS) { - $('.alert').text('Easy!Appointments has been successfully installed!'); - $('.alert').addClass('alert-success'); - $('.alert').show(); - setTimeout(function() { - window.location.href = GlobalVariables.baseUrl + '/index.php/backend'; - }, 1000); - } + $('.alert').text('Easy!Appointments has been successfully installed!'); + $('.alert').addClass('alert-success'); + $('.alert').show(); + setTimeout(function() { + window.location.href = GlobalVariables.baseUrl + '/index.php/backend'; + }, 1000); }, error: function(jqXHR, textStatus, errorThrown) { // Treat the error the same way as php exceptions.