Update install_fusionpbx.php

This commit is contained in:
FusionPBX 2017-11-17 09:41:51 -07:00 committed by GitHub
parent 83671cd104
commit f018dd0c8c
1 changed files with 5 additions and 14 deletions

View File

@ -286,10 +286,7 @@ include "root.php";
//add the database structure //add the database structure
require_once "resources/classes/schema.php"; require_once "resources/classes/schema.php";
$schema = new schema; $schema = new schema;
$schema->db = $this->dbh; echo $schema->schema();
$schema->db_type = $this->global_settings->db_type();
$schema->sql();
$schema->exec();
//get the contents of the sql file //get the contents of the sql file
if (file_exists('/usr/share/examples/fusionpbx/sql/sqlite.sql')){ if (file_exists('/usr/share/examples/fusionpbx/sql/sqlite.sql')){
@ -381,17 +378,14 @@ include "root.php";
//add the database structure //add the database structure
require_once "resources/classes/schema.php"; require_once "resources/classes/schema.php";
$schema = new schema; $schema = new schema;
$schema->db = $this->dbh; //echo $schema->schema();
$schema->db_type = $this->global_settings->db_type();
$schema->sql();
$schema->exec();
//get the contents of the sql file //get the contents of the sql file
if (file_exists('/usr/share/examples/fusionpbx/sql/pgsql.sql')){ if (file_exists('/usr/share/examples/fusionpbx/sql/pgsql.sql')){
$filename = "/usr/share/examples/fusionpbx/sql/pgsql.sql"; $filename = "/usr/share/examples/fusionpbx/sql/pgsql.sql";
} }
else { else {
$filename = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/sql/pgsql.sql'; $filename = $_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/resources/install/sql/pgsql.sql';
} }
$file_contents = file_get_contents($filename); $file_contents = file_get_contents($filename);
@ -551,10 +545,7 @@ include "root.php";
//add the database structure //add the database structure
require_once "resources/classes/schema.php"; require_once "resources/classes/schema.php";
$schema = new schema; $schema = new schema;
$schema->db = $this->dbh; //echo $schema->schema();
$schema->db_type = $this->global_settings->db_type();
$schema->sql();
$schema->exec();
//add the defaults data into the database //add the defaults data into the database
//get the contents of the sql file //get the contents of the sql file
@ -821,7 +812,7 @@ include "root.php";
//add the database structure //add the database structure
require_once "resources/classes/schema.php"; require_once "resources/classes/schema.php";
$schema = new schema; $schema = new schema;
echo $schema->schema(); //echo $schema->schema();
//run all app_defaults.php files //run all app_defaults.php files
$default_language = $this->install_language; $default_language = $this->install_language;