This commit is contained in:
Jose Gonzalez 2020-11-25 14:33:52 +01:00
parent da3bb9b808
commit 7187c54730
2 changed files with 2 additions and 17 deletions

View File

@ -54,16 +54,12 @@ if ($sec2 === 'extensions/agents_alerts') {
*/ */
function mainAgentsAlerts() function mainAgentsAlerts()
{ {
global $ajaxPage;
// This page.
$thisOwnPage = 'index.php?sec=view&sec2=extensions/agents_alerts';
// Ajax variables. // Ajax variables.
$ajaxPage = 'extensions/agents_alerts';
$pageName = '[AgentsAlerts]'; $pageName = '[AgentsAlerts]';
// Control call flow. // Control call flow.
try { try {
// User access and validation is being processed on class constructor. // User access and validation is being processed on class constructor.
$obj = new AgentsAlerts($ajaxPage); $obj = new AgentsAlerts();
} catch (Exception $e) { } catch (Exception $e) {
if (is_ajax() === true) { if (is_ajax() === true) {
echo json_encode(['error' => $pageName.$e->getMessage() ]); echo json_encode(['error' => $pageName.$e->getMessage() ]);

View File

@ -43,13 +43,6 @@ require_once $config['homedir'].'/include/functions_reporting.php';
class AgentsAlerts extends HTML class AgentsAlerts extends HTML
{ {
/**
* Var that contain very cool stuff
*
* @var string
*/
private $ajaxController;
/** /**
* Selected refresh rate * Selected refresh rate
* *
@ -110,11 +103,9 @@ class AgentsAlerts extends HTML
/** /**
* Constructor * Constructor
* *
* @param string $ajaxController Path.
*
* @return $this * @return $this
*/ */
public function __construct(string $ajaxController) public function __construct()
{ {
global $config; global $config;
@ -135,8 +126,6 @@ class AgentsAlerts extends HTML
exit; exit;
} }
// Capture all parameters before start.
$this->ajaxController = $ajaxController;
// Pure variable for full screen selection. // Pure variable for full screen selection.
$this->pure = $config['pure']; $this->pure = $config['pure'];
// Id user. // Id user.