Even more Bugfixes
This commit is contained in:
parent
2f004dd4c8
commit
9de6b22a90
0
core/Configuration/.gitignore
vendored
Normal file → Executable file
0
core/Configuration/.gitignore
vendored
Normal file → Executable file
0
core/Configuration/.htaccess
Normal file → Executable file
0
core/Configuration/.htaccess
Normal file → Executable file
0
core/Configuration/Configuration.class.php
Normal file → Executable file
0
core/Configuration/Configuration.class.php
Normal file → Executable file
0
core/Configuration/CreateDatabase.class.php
Normal file → Executable file
0
core/Configuration/CreateDatabase.class.php
Normal file → Executable file
@ -153,6 +153,7 @@ namespace Documents\Install {
|
||||
if(!$success) {
|
||||
$msg = "The following requirements failed the check:<br>" .
|
||||
$this->createUnorderedList($failedRequirements);
|
||||
$this->errorString = $msg;
|
||||
}
|
||||
|
||||
return array("success" => $success, "msg" => $msg);
|
||||
@ -632,7 +633,7 @@ namespace Documents\Install {
|
||||
|
||||
if(isset($currentView["progressText"])) {
|
||||
$progressText = $currentView["progressText"];
|
||||
$html .= "<div id=\"progressText\" class=\"my-3\">$progressText$spinnerIcon</i></div>";
|
||||
$html .= "<div id=\"progressText\" style=\"display:none\" class=\"my-3\">$progressText$spinnerIcon</i></div>";
|
||||
}
|
||||
|
||||
if(isset($currentView["form"])) {
|
||||
@ -660,7 +661,11 @@ namespace Documents\Install {
|
||||
);
|
||||
|
||||
if($this->currentStep != self::FINISH_INSTALLATION) {
|
||||
if ($this->currentStep == self::CHECKING_REQUIRMENTS) {
|
||||
$buttons[] = array("title" => "Retry", "type" => "success", "id" => "btnRetry", "float" => "right");
|
||||
} else {
|
||||
$buttons[] = array("title" => "Submit", "type" => "success", "id" => "btnSubmit", "float" => "right");
|
||||
}
|
||||
} else {
|
||||
$buttons[] = array("title" => "Finish", "type" => "success", "id" => "btnFinish", "float" => "right");
|
||||
}
|
||||
@ -703,7 +708,7 @@ namespace Documents\Install {
|
||||
$this->steps = array(
|
||||
self::CHECKING_REQUIRMENTS => array(
|
||||
"title" => "Checking requirements",
|
||||
"status" => self::NOT_STARTED
|
||||
"status" => self::ERROR
|
||||
),
|
||||
self::DATABASE_CONFIGURATION => array(
|
||||
"title" => "Database configuration",
|
||||
@ -737,6 +742,7 @@ namespace Documents\Install {
|
||||
// POST
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
$response = $this->performStep();
|
||||
$response["step"] = $this->currentStep;
|
||||
die(json_encode($response));
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,7 @@ if(isset($_GET["api"]) && is_string($_GET["api"])) {
|
||||
header("Location: /");
|
||||
} else {
|
||||
$document = new Documents\Install($user);
|
||||
$response = $document->getCode();
|
||||
}
|
||||
} else {
|
||||
if(empty($documentName) || strcasecmp($documentName, "install") === 0) {
|
||||
@ -83,10 +84,10 @@ if(isset($_GET["api"]) && is_string($_GET["api"])) {
|
||||
} else {
|
||||
$document = new $class($user);
|
||||
}
|
||||
}
|
||||
|
||||
$response = $document->getCode();
|
||||
}
|
||||
}
|
||||
|
||||
$user->sendCookies();
|
||||
die($response);
|
||||
|
@ -38,12 +38,16 @@ function setState(state) {
|
||||
li.find("i").removeClass().addClass(icon);
|
||||
}
|
||||
|
||||
function getCurrentStep() {
|
||||
return $("#currentStep").index() + 1;
|
||||
}
|
||||
|
||||
function sendRequest(params, done) {
|
||||
setState(PENDING);
|
||||
var success = false;
|
||||
$("#status").hide();
|
||||
$.post("/index.php", params, function(data) {
|
||||
if(data.success) {
|
||||
if(data.success || data.step != getCurrentStep()) {
|
||||
success = true;
|
||||
window.location.reload();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user