mirror of
https://github.com/itflow-org/itflow
synced 2026-02-28 10:54:52 +00:00
fix redirect loop if no config.php exists
This commit is contained in:
12
setup.php
12
setup.php
@@ -3,7 +3,11 @@
|
||||
include("config.php");
|
||||
include("functions.php");
|
||||
|
||||
if(!isset($config_enable_setup) or $config_enable_setup == 0){
|
||||
if(!isset($config_enable_setup)){
|
||||
$config_enable_setup = 1;
|
||||
}
|
||||
|
||||
if($config_enable_setup == 0){
|
||||
header("Location: login.php");
|
||||
}
|
||||
|
||||
@@ -85,12 +89,14 @@ if(isset($_POST['add_database'])){
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
$txt = "\$config_app_name = 'IT CRM';\n\n";
|
||||
$txt = "\$config_app_name = 'IT CRM';\n";
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
fclose($myfile);
|
||||
|
||||
include("config.php");
|
||||
|
||||
// Name of the file
|
||||
$filename = 'db.sql';
|
||||
// Temporary variable, used to store current query
|
||||
@@ -196,7 +202,7 @@ if(isset($_POST['add_company_settings'])){
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
$txt = "?>";
|
||||
$txt = "?>\n";
|
||||
|
||||
fwrite($myfile, $txt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user