Update Sccp_manager.class.php

Remove unnecessary tests
This commit is contained in:
steve-lad 2021-06-03 08:56:04 +02:00
parent c1f35ace41
commit 8341cba1ca

View file

@ -323,8 +323,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
$request = $_REQUEST; $request = $_REQUEST;
$action = !empty($request['action']) ? $request['action'] : ''; $action = !empty($request['action']) ? $request['action'] : '';
$inputform = !empty($request['tech_hardware']) ? $request['tech_hardware'] : ''; $inputform = !empty($request['tech_hardware']) ? $request['tech_hardware'] : '';
if (empty($this->pagedata)) {
switch ($inputform) { switch ($inputform) {
case 'dialplan': case 'dialplan':
$this->pagedata = array( $this->pagedata = array(
@ -353,26 +351,15 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
} }
break; break;
} }
$this->processPageData();
}
return $this->pagedata;
}
public function processPageData() { $this->processPageData();
foreach ($this->pagedata as &$page) { return $this->pagedata;
ob_start();
include($page['page']);
$page['content'] = ob_get_contents();
ob_end_clean();
}
} }
public function phoneShowPage() { public function phoneShowPage() {
$request = $_REQUEST; $request = $_REQUEST;
$action = !empty($request['action']) ? $request['action'] : ''; $action = !empty($request['action']) ? $request['action'] : '';
$inputform = !empty($request['tech_hardware']) ? $request['tech_hardware'] : ''; $inputform = !empty($request['tech_hardware']) ? $request['tech_hardware'] : '';
if (empty($this->pagedata)) {
switch ($inputform) { switch ($inputform) {
case "cisco": case "cisco":
$this->pagedata = array( $this->pagedata = array(
@ -435,6 +422,11 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
} }
break; break;
} }
$this->processPageData();
return $this->pagedata;
}
public function processPageData() {
foreach ($this->pagedata as &$page) { foreach ($this->pagedata as &$page) {
ob_start(); ob_start();
include($page['page']); include($page['page']);
@ -443,9 +435,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
} }
} }
return $this->pagedata;
}
/* /*
* *
* * Save Hardware Device Information to Db + ???? Create / update XML Profile * * Save Hardware Device Information to Db + ???? Create / update XML Profile