Move config.php into install -> app defaults method.

This commit is contained in:
markjcrane
2015-11-27 18:13:13 -07:00
parent 12416cb972
commit d447f10c03
2 changed files with 13 additions and 11 deletions

View File

@@ -303,15 +303,6 @@ if(!$install_step) { $install_step = 'select_language'; }
}
}
//include the config.php
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
require_once $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php";
} elseif (file_exists("/etc/fusionpbx/config.php")) {
require_once "/etc/fusionpbx/config.php";
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
require_once "/usr/local/etc/fusionpbx/config.php";
}
require_once "resources/classes/install_switch.php";
$switch = new install_switch($domain_name, $domain_uuid, $switch_detect);
//$switch->debug = true;

View File

@@ -978,6 +978,17 @@ include "root.php";
public function app_defaults() {
$this->write_progress("Running app_defaults");
//include the config.php
if (strlen($db_name) == 0) {
if (file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php")) {
require_once $_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/resources/config.php";
} elseif (file_exists("/etc/fusionpbx/config.php")) {
require_once "/etc/fusionpbx/config.php";
} elseif (file_exists("/usr/local/etc/fusionpbx/config.php")) {
require_once "/usr/local/etc/fusionpbx/config.php";
}
}
//set needed session settings
$_SESSION["username"] = $this->admin_username;
$_SESSION["domain_uuid"] = $this->_domain_uuid;
@@ -1020,10 +1031,10 @@ include "root.php";
require_once "resources/classes/schema.php";
global $db, $db_type, $db_name, $db_username, $db_password, $db_host, $db_path, $db_port;
$schema = new schema;
echo $schema->schema();
//run all app_defaults.php files
$default_language = $this->install_language;
$domain = new domains;