added auto usage of global_settings where not provided
This commit is contained in:
parent
4d62a36e1c
commit
bcfd71577c
|
|
@ -296,7 +296,9 @@ if(!$install_step) { $install_step = 'select_language'; }
|
||||||
try {
|
try {
|
||||||
require_once "resources/classes/global_settings.php";
|
require_once "resources/classes/global_settings.php";
|
||||||
$settings = new global_settings($detect_switch, $domain_name);
|
$settings = new global_settings($detect_switch, $domain_name);
|
||||||
|
if($settings = null){
|
||||||
|
throw new Exception("Error global_settings came back with null");
|
||||||
|
}
|
||||||
require_once "resources/classes/install_fusionpbx.php";
|
require_once "resources/classes/install_fusionpbx.php";
|
||||||
$system = new install_fusionpbx($settings);
|
$system = new install_fusionpbx($settings);
|
||||||
$system->admin_username = $admin_username;
|
$system->admin_username = $admin_username;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,10 @@ include "root.php";
|
||||||
public $template_name = 'enhanced';
|
public $template_name = 'enhanced';
|
||||||
|
|
||||||
function __construct($global_settings) {
|
function __construct($global_settings) {
|
||||||
if(!is_a($global_settings, 'global_settings')){
|
if($global_settings == null){
|
||||||
|
require_once "resources/classes/global_settings.php";
|
||||||
|
$global_settings = new global_settings();
|
||||||
|
elseif(!is_a($global_settings, 'global_settings')){
|
||||||
throw new Exception('The parameter $global_settings must be a global_settings object (or a subclass of)');
|
throw new Exception('The parameter $global_settings must be a global_settings object (or a subclass of)');
|
||||||
}
|
}
|
||||||
$this->global_settings = $global_settings;
|
$this->global_settings = $global_settings;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,10 @@ include "root.php";
|
||||||
public $debug = false;
|
public $debug = false;
|
||||||
|
|
||||||
function __construct($global_settings) {
|
function __construct($global_settings) {
|
||||||
if(!is_a($global_settings, 'global_settings')){
|
if($global_settings == null){
|
||||||
|
require_once "resources/classes/global_settings.php";
|
||||||
|
$global_settings = new global_settings();
|
||||||
|
elseif(!is_a($global_settings, 'global_settings')){
|
||||||
throw new Exception('The parameter $global_settings must be a global_settings object (or a subclass of)');
|
throw new Exception('The parameter $global_settings must be a global_settings object (or a subclass of)');
|
||||||
}
|
}
|
||||||
$this->global_settings = $global_settings;
|
$this->global_settings = $global_settings;
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
//run switch upgrade
|
//run switch upgrade
|
||||||
require_once "resources/classes/install_switch.php";
|
require_once "resources/classes/install_switch.php";
|
||||||
$switch = new install_switch;
|
$switch = new install_switch();
|
||||||
$switch->upgrade();
|
$switch->upgrade();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue