Fix update settings page on save
This commit is contained in:
parent
ea6b7b3783
commit
a3eb87610c
|
@ -110,7 +110,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
if ($freepbx == null) {
|
if ($freepbx == null) {
|
||||||
throw new Exception("Not given a FreePBX Object");
|
throw new Exception("Not given a FreePBX Object");
|
||||||
}
|
}
|
||||||
dbug('__construct called', debug_backtrace(2));
|
|
||||||
$this->class_error = array();
|
$this->class_error = array();
|
||||||
$this->FreePBX = $freepbx;
|
$this->FreePBX = $freepbx;
|
||||||
$this->db = $freepbx->Database;
|
$this->db = $freepbx->Database;
|
||||||
|
@ -136,11 +136,20 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sccpvalues = $this->dbinterface->get_db_SccpSetting(); //Initialise core settings
|
//if (!isset(\FreePBX::create()->Sccp_manager)) {
|
||||||
$this->initializeSccpPath(); //Set required Paths
|
// This test is a workaround for a bug in BMO/GUIHooks class where
|
||||||
$this->updateTimeZone(); // Get timezone from FreePBX
|
// doBMOConfigPage is called with an incorrect class (class path instead of class)
|
||||||
//$this->findInstLangs();
|
// The __Get override then determines that the class does not exist and so creates a new class Which
|
||||||
$this->saveSccpSettings();
|
// in turn calls this __construct. This test can be removed when the bug is fixed in FreePBX.
|
||||||
|
|
||||||
|
dbug('__construct called', debug_backtrace(2));
|
||||||
|
|
||||||
|
$this->sccpvalues = $this->dbinterface->get_db_SccpSetting(); //Initialise core settings
|
||||||
|
$this->initializeSccpPath(); //Set required Paths
|
||||||
|
$this->updateTimeZone(); // Get timezone from FreePBX
|
||||||
|
//$this->findInstLangs();
|
||||||
|
$this->saveSccpSettings();
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -15,6 +15,11 @@ if (!defined('FREEPBX_IS_AUTH')) {
|
||||||
// is only for DISPLAYING things. MVC is a cool idea, ya know?
|
// is only for DISPLAYING things. MVC is a cool idea, ya know?
|
||||||
//
|
//
|
||||||
dbug(debug_backtrace());
|
dbug(debug_backtrace());
|
||||||
|
if (isset(\FreePBX::create()->Sccp_manager)) {
|
||||||
|
dbug('is set');
|
||||||
|
} else {
|
||||||
|
dbug('is not set');
|
||||||
|
}
|
||||||
$spage = FreePBX::create()->Sccp_manager;
|
$spage = FreePBX::create()->Sccp_manager;
|
||||||
if (empty($spage->class_error)) {
|
if (empty($spage->class_error)) {
|
||||||
$display_page = $spage->phoneShowPage();
|
$display_page = $spage->phoneShowPage();
|
||||||
|
|
|
@ -6,7 +6,6 @@ trait bmoFunctions {
|
||||||
|
|
||||||
//Need to reload freePBX for modifications below to work
|
//Need to reload freePBX for modifications below to work
|
||||||
|
|
||||||
//want to catch extensions
|
|
||||||
public static function myConfigPageInits() {
|
public static function myConfigPageInits() {
|
||||||
return array('sccpsettings', 'sccp_phone','sccp_adv');
|
return array('sccpsettings', 'sccp_phone','sccp_adv');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue