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.