mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fix
This commit is contained in:
parent
da3bb9b808
commit
7187c54730
@ -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() ]);
|
||||||
|
@ -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.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user