Fix
This commit is contained in:
parent
da3bb9b808
commit
7187c54730
|
@ -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() ]);
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue