mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
added auto usage of global_settings where not provided
This commit is contained in:
@@ -35,7 +35,10 @@ include "root.php";
|
||||
public $debug = false;
|
||||
|
||||
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)');
|
||||
}
|
||||
$this->global_settings = $global_settings;
|
||||
|
||||
Reference in New Issue
Block a user