#12460 fixed deprecated

This commit is contained in:
Daniel Cebrian 2024-01-30 13:14:54 +01:00
parent 22598b4bc2
commit c0ad547625
9 changed files with 79 additions and 9 deletions

View File

@ -128,6 +128,6 @@ if (empty($data)) {
} }
echo '{ echo '{
"label": "'.htmlspecialchars($graph_title, ENT_QUOTES).'", "label": "'.htmlspecialchars(($graph_title ?? ''), ENT_QUOTES).'",
"data": [["'.time().'", '.htmlspecialchars($data, ENT_QUOTES).']] "data": [["'.time().'", '.htmlspecialchars(($data ?? ''), ENT_QUOTES).']]
}'; }';

View File

@ -505,7 +505,7 @@ $tableBasicThresholds->data['caption_switch_warning_inverse_string'][0] = html_p
$tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_str_warning">('.__('Str.').')</span>'; $tableBasicThresholds->data['caption_warning_threshold'][0] .= '<span class="font_11" id="caption_str_warning">('.__('Str.').')</span>';
$tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text( $tableBasicThresholds->data['warning_threshold'][0] .= html_print_input_text(
'str_warning', 'str_warning',
str_replace('"', '', $str_warning), str_replace('"', '', (isset($str_warning) === true) ? $str_warning : ''),
'', '',
10, 10,
1024, 1024,
@ -602,7 +602,7 @@ $tableBasicThresholds->data['switch_critical_threshold'][0] .= html_print_div(
$tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_str_critical">('.__('Str.').')</span>'; $tableBasicThresholds->data['caption_critical_threshold'][0] .= '<span class="font_11" id="caption_str_critical">('.__('Str.').')</span>';
$tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text( $tableBasicThresholds->data['critical_threshold'][0] .= html_print_input_text(
'str_critical', 'str_critical',
str_replace('"', '', $str_critical), str_replace('"', '', (isset($str_critical) === true) ? $str_critical : ''),
'', '',
10, 10,
1024, 1024,

View File

@ -53,6 +53,48 @@ class AuditLog extends HTML
*/ */
private $ajaxController; private $ajaxController;
/**
* TableId
*
* @var integer
*/
public $tableId;
/**
* FilterIp
*
* @var array
*/
public $filterIp;
/**
* FilterPeriod
*
* @var integer
*/
public $filterPeriod;
/**
* FilterText
*
* @var string
*/
public $filterText;
/**
* FilterType
*
* @var string
*/
public $filterType;
/**
* FilterUser
*
* @var string
*/
public $filterUser;
/** /**
* Class constructor * Class constructor

View File

@ -850,7 +850,7 @@ class CredentialStore extends Wizard
'privilege' => 'AR', 'privilege' => 'AR',
'type' => 'select_groups', 'type' => 'select_groups',
'nothing' => false, 'nothing' => false,
'selected' => (defined($id_group_filter) ? $id_group_filter : 0), 'selected' => ((isset($id_group_filter) === true) ? $id_group_filter : 0),
'return' => true, 'return' => true,
'size' => '80%', 'size' => '80%',
], ],

View File

@ -67,6 +67,34 @@ class SatelliteAgent extends HTML
*/ */
private $ajaxController; private $ajaxController;
/**
* Satellite_name
*
* @var string
*/
public $satellite_name;
/**
* Satellite_server
*
* @var string
*/
public $satellite_server;
/**
* TableId
*
* @var integer
*/
public $tableId;
/**
* Satellite_config
*
* @var string
*/
public $satellite_config;
/** /**
* Class constructor * Class constructor

View File

@ -440,7 +440,7 @@ function extensions_add_operation_menu_option($name, $fatherId=null, $icon=null,
$option_menu['acl'] = $acl; $option_menu['acl'] = $acl;
$extension = &$config['extensions'][$extension_file]; $extension = &$config['extensions'][$extension_file];
$option_menu['sec2'] = $extension['dir'].'/'.mb_substr($extension_file, 0, -4); $option_menu['sec2'] = $extension['dir'].'/'.mb_substr(($extension_file ?? ''), 0, -4);
$option_menu['fatherId'] = $fatherId; $option_menu['fatherId'] = $fatherId;
$option_menu['subfatherId'] = $subfatherId; $option_menu['subfatherId'] = $subfatherId;
$option_menu['icon'] = $icon; $option_menu['icon'] = $icon;

View File

@ -818,7 +818,7 @@ function notifications_print_global_source_configuration($source)
$html_checkboxes = ''; $html_checkboxes = '';
$blacklist = json_decode($source['subtype_blacklist'], 1); $blacklist = json_decode(($source['subtype_blacklist'] ?? ''), 1);
if (json_last_error() !== JSON_ERROR_NONE) { if (json_last_error() !== JSON_ERROR_NONE) {
$blacklist = []; $blacklist = [];
} }

View File

@ -446,7 +446,7 @@ class SecurityHardening extends Widget
{ {
global $config; global $config;
$id_groups = explode(',', $group); $id_groups = explode(',', ($group ?? ''));
if (in_array(0, $id_groups) === true) { if (in_array(0, $id_groups) === true) {
$id_groups = array_keys(users_get_groups($config['id_user'], 'AR', false)); $id_groups = array_keys(users_get_groups($config['id_user'], 'AR', false));
} }

View File

@ -43,7 +43,7 @@ $form = [
'extra' => 'novalidate', 'extra' => 'novalidate',
]; ];
$js = 'tinymce.init({ $js .= ' tinymce.init({
selector: "#textarea_text", selector: "#textarea_text",
plugins: "preview, searchreplace, table, nonbreaking, link, image", plugins: "preview, searchreplace, table, nonbreaking, link, image",
promotion: false, promotion: false,