Skip to content

Commit

Permalink
Fixed a fairly buggy installer and added a tad of "polish". There was…
Browse files Browse the repository at this point in the history
… a problem were it wouldn't correctly use the data it got from the SQL check. This would prevent you from proceeding to the next step even if you did have correct details.
  • Loading branch information
kmark committed May 21, 2010
1 parent f37f5c5 commit 7bc7f73
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions includes/tpl/install/install.tpl
Expand Up @@ -33,24 +33,29 @@ function change() {
document.getElementById("button3").disabled = true;
document.getElementById("button3").value = "Working...";
$.get("<AJAX>?function=sqlcheck&host="+document.getElementById("hostname").value+"&user="+document.getElementById("username").value+"&pass="+document.getElementById("password").value+"&db="+document.getElementById("database").value+"&pre="+document.getElementById("prefix").value, function(mydata) {
document.getElementById("button3").disabled = false; document.getElementById("button3").value = "Next Step";
document.getElementById("sqlerror").innerHTML = mydata;
switch(mydata) {
case "0":
document.getElementById("button3").disabled = false;
document.getElementById("button3").value = "Next Step";
//This if statement isn't really a big deal, but it adds some polish.
if(parseInt(mydata) != 2) {
document.getElementById("sqlerror").innerHTML = mydata;
}
switch(parseInt(mydata)) {
case 0:
document.getElementById("sqlerror").innerHTML = wrong+"Your SQL Details are incorrect!";
break;
case "1":
case 1:
document.getElementById("sqlerror").innerHTML = wrong+"Your SQL Database is incorrect!";
break;
case "2":
case 2:
gogo();
document.getElementById("step3").innerHTML = working;
installstuff();
break;
case "3":
case 3:
document.getElementById("sqlerror").innerHTML = wrong+"Your Config isn't writeable!";
break;
case "4":
case 4:
document.getElementById("sqlerror").innerHTML = wrong+"THT is already installed!";
break;
}
Expand Down

0 comments on commit 7bc7f73

Please sign in to comment.