Skip to content

Commit

Permalink
Only make changes to files when not in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitkerem committed Dec 15, 2020
1 parent 1408d0a commit 3e70623
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
19 changes: 14 additions & 5 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
require_once("classes/locale-negotiator.php");
require_once("classes/db-class.php");

$isDeveleoperEnvironement = false;
if(isset($_GET["isDev"])){
if($_GET["isDev"] == "devMode"){
$isDeveleoperEnvironement = true;
}
}


$negotiator = new LocaleNegotiator("en_GB");
$message = "";
$db = new SSDB();
Expand Down Expand Up @@ -161,11 +169,12 @@
$db->setSetting($mysqli,"google_recaptcha_secret","");
$db->setSetting($mysqli,"google_recaptcha_sitekey","");
$db->setSetting($mysqli,"cron_server_ip","");
unlink("create-server-config.php");
unlink("config.php.template");
unlink("install.sql");
unlink(__FILE__);

if(!$isDeveleoperEnvironement) {
unlink("create-server-config.php");
unlink("config.php.template");
unlink("install.sql");
unlink(__FILE__);
}
header("Location: ".WEB_URL);
}
}
Expand Down
2 changes: 0 additions & 2 deletions template.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php
//This should later be translatable, maybe find a better solution?
//This is here for better generation of POT files :)
$statuses = array(_("Major outage"), _("Minor outage"), _("Planned maintenance"), _("Operational") );
$classes = array("danger", "warning", "primary", "success" );
$icons = array("fa fa-times", "fa fa-exclamation", "fa fa-info", "fa fa-check" );
Expand Down

0 comments on commit 3e70623

Please sign in to comment.