Skip to content

Commit

Permalink
fix check config file button
Browse files Browse the repository at this point in the history
  • Loading branch information
wellingguzman committed Aug 26, 2016
1 parent 93be0ca commit 82828c6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
12 changes: 7 additions & 5 deletions installation/assets/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,19 @@ $(window).ready(function() {
return false;
}
});

var fetching = false;
$('#retryButton').click(function(e) {
$target = $(e.target);
if(fetching) {
e.preventDefault();

if (fetching) {
return;
}
fetching = true;

$.get('config_test.php', function(res) {
fetching = true;
$.get('index.php?step=4&check_config', function(res) {
fetching = false;
if(res === 'true') {
if (res === 'true') {
$('#failSpan').html('<span class="label label-success">Yes</span>');
}
});
Expand Down
7 changes: 7 additions & 0 deletions installation/includes/Steps/ConfirmStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ class ConfirmStep extends AbstractStep

public function preRun(&$state)
{
// Request for checking if the api is writeable
// returns a true or false string
if (isset($_GET['check_config'])) {
echo is_writeable(BASE_PATH . '/api') ? 'true' : 'false';
exit;
}

$steps = $state['steps'];
foreach($steps as $step) {
if ($step->getName() != 'database') {
Expand Down

0 comments on commit 82828c6

Please sign in to comment.