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()
{
global $ajaxPage;
// This page.
$thisOwnPage = 'index.php?sec=view&sec2=extensions/agents_alerts';
// Ajax variables.
$ajaxPage = 'extensions/agents_alerts';
$pageName = '[AgentsAlerts]';
// Control call flow.
try {
// User access and validation is being processed on class constructor.
$obj = new AgentsAlerts($ajaxPage);
$obj = new AgentsAlerts();
} catch (Exception $e) {
if (is_ajax() === true) {
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
{
/**
* Var that contain very cool stuff
*
* @var string
*/
private $ajaxController;
/**
* Selected refresh rate
*
@ -110,11 +103,9 @@ class AgentsAlerts extends HTML
/**
* Constructor
*
* @param string $ajaxController Path.
*
* @return $this
*/
public function __construct(string $ajaxController)
public function __construct()
{
global $config;
@ -135,8 +126,6 @@ class AgentsAlerts extends HTML
exit;
}
// Capture all parameters before start.
$this->ajaxController = $ajaxController;
// Pure variable for full screen selection.
$this->pure = $config['pure'];
// Id user.