Continued BMO optimisations

Tidy up ajaxHelper
Set correct return values from ajaxHandler
Use BMO __get to minimise construct calls
Implement Module.xml depends
This commit is contained in:
stevenA 2022-01-12 12:22:14 +01:00
parent fbac438a45
commit af1725e025
3 changed files with 0 additions and 9 deletions

View file

@ -306,8 +306,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
}
public function phoneShowPage() {
dbug($_REQUEST);
dbug(debug_backtrace(0));
$request = $_REQUEST;
$action = !empty($request['action']) ? $request['action'] : '';
$inputform = !empty($request['tech_hardware']) ? $request['tech_hardware'] : '';

View file

@ -14,12 +14,6 @@ if (!defined('FREEPBX_IS_AUTH')) {
// function is called. This is where you do any changes. The page.foo.php
// is only for DISPLAYING things. MVC is a cool idea, ya know?
//
dbug(debug_backtrace());
if (isset(\FreePBX::create()->Sccp_manager)) {
dbug('is set');
} else {
dbug('is not set');
}
$spage = FreePBX::create()->Sccp_manager;
if (empty($spage->class_error)) {
$display_page = $spage->phoneShowPage();

View file

@ -45,7 +45,6 @@ trait ajaxHelper {
$request = $_REQUEST;
$msg = array();
$cmd_id = $request['command'];
dbug('ajax', $cmd_id);
switch ($cmd_id) {
case 'savesettings':
// Consolidate this into a separate method to improve legibility