diff --git a/conf/Sccp.class.php.v433 b/conf/Sccp.class.php.v433
index 46fbbda..b839999 100644
--- a/conf/Sccp.class.php.v433
+++ b/conf/Sccp.class.php.v433
@@ -31,21 +31,8 @@ class Sccp extends \FreePBX\modules\Core\Driver {
);
}
-/* public function addDevice1($id, $settings) {
- $sql = 'INSERT INTO sccp (id, keyword, data, flags) values (?,?,?,?)';
- $sth = $this->database->prepare($sql);
- $settings = is_array($settings)?$settings:array();
- foreach($settings as $key => $setting) {
- $sth->execute(array($id,$key,$setting['value'],$setting['flag']));
- }
- return true;
- }
-*/
public function addDevice($id, $settings) {
$add_fld = array ("name"=>'label',"outboundcid"=>'cid_num',"langcode"=>'language',"extdisplay"=>'description');
- // print_r($_REQUEST);
- // echo '
';
- // die(print_r($settings));
$settings['cid_num']['value'] = '';
$settings['cid_name']['value'] = $label;
$settings['mailbox']['value']= '';
@@ -84,7 +71,6 @@ class Sccp extends \FreePBX\modules\Core\Driver {
}
}
- // die(print_r($settings));
$tech = Array();
$sql = "DESCRIBE sccpline";
foreach ($this->database->query($sql) as $row) {
@@ -102,6 +88,7 @@ class Sccp extends \FreePBX\modules\Core\Driver {
$sth = $this->database->prepare($sql);
$sth->execute();
+ redirect('http://192.168.50.254/admin/config.php?display=sccp_phone', false);
return true;
}
diff --git a/sccpManTraits/bmoFunctions.php b/sccpManTraits/bmoFunctions.php
index 9bbd35e..b75a159 100644
--- a/sccpManTraits/bmoFunctions.php
+++ b/sccpManTraits/bmoFunctions.php
@@ -6,15 +6,13 @@ trait bmoFunctions {
//Need to reload freePBX for modifications below to work
- //need to catch extensions
+ //want to catch extensions
public static function myConfigPageInits() {
- dbug('have config page inits');
return array("extensions");
}
public function doConfigPageInit($page) {
if ($page == "extensions") {
- dbug('have extensions in doConfigPageInit');
}
$this->doGeneralPost();
}
@@ -25,19 +23,13 @@ trait bmoFunctions {
}
public function doGuiHook(&$cc) {
- dbug('$_REQUEST', $_REQUEST);
- //dbug('CC', $cc);
if ($_REQUEST['display'] == "extensions" ) {
if (isset($_REQUEST['tech_hardware'])) {
- dbug('Have caught hook in doGuiHook');
- $this->getActionBar($_REQUEST);
+ //this is the add extensions form
}
- //$cc->addguielem("_top", new \gui_pageheading('', 'I added a header', false));
}
}
-
-
-
+
/* unused but FPBX API requires it */
public function install() {
@@ -64,6 +56,7 @@ trait bmoFunctions {
public function getActionBar($request) {
$buttons = array();
+ dbug('Request in BMO is', $request);
switch ($request['display']) {
case 'sccp_adv':
if (empty($request['tech_hardware'])) {
@@ -132,6 +125,7 @@ trait bmoFunctions {
break;
case 'extensions':
// only called from configpage inits
+ dbug('in case extensions');
$buttons = array(
'submit' => array(
'name' => 'ajaxsubmit',
diff --git a/views/hardware.extension.php b/views/hardware.extension.php
index 32d1e0a..d6cde2a 100644
--- a/views/hardware.extension.php
+++ b/views/hardware.extension.php
@@ -39,12 +39,12 @@ if (!empty($this->sccpvalues['system_rouminguser'])) {
function DispayPhoneActionsKeyFormatter(value, row, index) {
var exp_dev = '';
var rmn_dev = '';
- exp_dev += " ";
- exp_dev += "";
+ exp_dev += ' ';
+ exp_dev += '';
if (rmn_dev == 'yes') {
- exp_dev += " ";
+ exp_dev += ' ';
}
return exp_dev;
- return " ";
+ return ' ';
}
diff --git a/views/hardware.rnav.php b/views/hardware.rnav.php
index 3080456..89914b8 100644
--- a/views/hardware.rnav.php
+++ b/views/hardware.rnav.php
@@ -3,7 +3,7 @@
-
+