#12695 wip removing warnings

This commit is contained in:
Jonathan 2024-02-14 17:43:20 +01:00
parent da2bef45f2
commit 42975c7967
27 changed files with 157 additions and 106 deletions

View File

@ -109,7 +109,7 @@ if (is_ajax()) {
for ($i = 1; $i <= $config['max_macro_fields']; $i++) { for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
$field_description = $fields_descriptions[($i - 1)]; $field_description = $fields_descriptions[($i - 1)];
$field_value = $fields_values[($i - 1)]; $field_value = $fields_values[($i - 1)];
$field_hidden = $fields_hidden_checked[($i - 1)]; $field_hidden = (isset($fields_hidden_checked[($i - 1)]) === true) ? $fields_hidden_checked[($i - 1)] : '';
if (!empty($field_description)) { if (!empty($field_description)) {

View File

@ -253,7 +253,7 @@ if (is_metaconsole() === true) {
echo '<br>'; echo '<br>';
} }
if (!$id_cluster) { if (isset($id_cluster) === false) {
ui_toggle( ui_toggle(
$form_filter, $form_filter,
'<span class="subsection_header_title">'.__('Alert control filter').'</span>', '<span class="subsection_header_title">'.__('Alert control filter').'</span>',
@ -1115,7 +1115,7 @@ if (isset($dont_display_alert_create_bttn)) {
} }
} }
if ($display_create && (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) && !$id_cluster) { if ($display_create && (check_acl($config['id_user'], 0, 'LW') || check_acl($config['id_user'], $template_group, 'LM')) && isset($id_cluster) === false) {
echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">'; echo '<form method="post" action="index.php?sec='.$sec.'&sec2=godmode/alerts/alert_list&tab=builder&pure='.$pure.'">';
$actionButtons = html_print_submit_button( $actionButtons = html_print_submit_button(
__('Create'), __('Create'),

View File

@ -242,6 +242,7 @@ if (empty($result) === false) {
html_print_table($table); html_print_table($table);
$tablePagination = ui_pagination($total_categories, $url, $offset, 0, true, 'offset', false); $tablePagination = ui_pagination($total_categories, $url, $offset, 0, true, 'offset', false);
} else { } else {
$tablePagination = '';
// No categories available or selected. // No categories available or selected.
ui_print_info_message(['no_close' => true, 'message' => __('No categories found') ]); ui_print_info_message(['no_close' => true, 'message' => __('No categories found') ]);
} }

View File

@ -195,13 +195,13 @@ foreach ($extensions as $file => $extension) {
$data[] = '<i class="grey">'.$file.'</i>'; $data[] = '<i class="grey">'.$file.'</i>';
// Get version of this extensions // Get version of this extensions
if ($config['extensions'][$file]['operation_menu']) { if (isset($config['extensions'][$file]['operation_menu']) === true) {
$data[] = $config['extensions'][$file]['operation_menu']['version']; $data[] = $config['extensions'][$file]['operation_menu']['version'];
} else if ($config['extensions'][$file]['godmode_menu']) { } else if (isset($config['extensions'][$file]['godmode_menu']) === true) {
$data[] = $config['extensions'][$file]['godmode_menu']['version']; $data[] = $config['extensions'][$file]['godmode_menu']['version'];
} else if ($config['extensions'][$file]['extension_ope_tab']) { } else if (isset($config['extensions'][$file]['extension_ope_tab']) === true) {
$data[] = $config['extensions'][$file]['extension_ope_tab']['version']; $data[] = $config['extensions'][$file]['extension_ope_tab']['version'];
} else if ($config['extensions'][$file]['extension_god_tab']) { } else if (isset($config['extensions'][$file]['extension_god_tab']) === true) {
$data[] = $config['extensions'][$file]['extension_god_tab']['version']; $data[] = $config['extensions'][$file]['extension_god_tab']['version'];
} else { } else {
$data[] = __('N/A'); $data[] = __('N/A');
@ -216,7 +216,7 @@ foreach ($extensions as $file => $extension) {
$data[] = $config['extensions'][$file]['godmode_menu']['version']; $data[] = $config['extensions'][$file]['godmode_menu']['version'];
} else if (isset($config['extensions'][$file]['extension_ope_tab'])) { } else if (isset($config['extensions'][$file]['extension_ope_tab'])) {
$data[] = $config['extensions'][$file]['extension_ope_tab']['version']; $data[] = $config['extensions'][$file]['extension_ope_tab']['version'];
} else if ($config['extensions'][$file]['extension_god_tab']) { } else if (isset($config['extensions'][$file]['extension_god_tab']) === true) {
$data[] = $config['extensions'][$file]['extension_god_tab']['version']; $data[] = $config['extensions'][$file]['extension_god_tab']['version'];
} else { } else {
$data[] = __('N/A'); $data[] = __('N/A');

View File

@ -1183,9 +1183,9 @@ $tab = 'group_edition';
<script type="text/javascript"> <script type="text/javascript">
let show_full_hirearchy = "<?php echo $show_full_hirearchy; ?>"; let show_full_hirearchy = "<?php echo (isset($show_full_hirearchy) === true) ? $show_full_hirearchy : ''; ?>";
let show_not_init_agents = "<?php echo $show_not_init_agents; ?>"; let show_not_init_agents = "<?php echo (isset($show_not_init_agents) === true) ? $show_not_init_agents : ''; ?>";
let show_not_init_modules = "<?php echo $show_not_init_modules; ?>"; let show_not_init_modules = "<?php echo (isset($show_not_init_modules) === true) ? $show_not_init_modules : ''; ?>";
$('#checkbox-show_full_hirearchy').on("change", function() { $('#checkbox-show_full_hirearchy').on("change", function() {
if (show_full_hirearchy == 1) { if (show_full_hirearchy == 1) {

View File

@ -686,6 +686,12 @@ $table->data[0][] = html_print_label_input_block(
) )
); );
if (isset($component) === false) {
$component = [];
$component['id'] = '';
$component['id_nc'] = '';
}
$filter_action_url = 'index.php?sec='.$sec.'&sec2=godmode/modules/manage_network_components&id='.$component['id_nc'].'&search_string='.urlencode(io_safe_output($search_string)).'&search_id_group'.$search_id_group.'&pure='.$pure; $filter_action_url = 'index.php?sec='.$sec.'&sec2=godmode/modules/manage_network_components&id='.$component['id_nc'].'&search_string='.urlencode(io_safe_output($search_string)).'&search_id_group'.$search_id_group.'&pure='.$pure;
$toggleFilters = '<form class="filters_form" method="POST" action="'.$filter_action_url.'">'; $toggleFilters = '<form class="filters_form" method="POST" action="'.$filter_action_url.'">';
$toggleFilters .= html_print_table($table, true); $toggleFilters .= html_print_table($table, true);
@ -824,7 +830,7 @@ foreach ($components as $component) {
$data[0] = io_safe_output($component['name']); $data[0] = io_safe_output($component['name']);
} }
$data[1] .= ui_print_servertype_icon((int) $component['id_modulo']); $data[1] = ui_print_servertype_icon((int) $component['id_modulo']);
$data[2] = ui_print_moduletype_icon($component['type'], true); $data[2] = ui_print_moduletype_icon($component['type'], true);
$data[3] = "<span class='font_8px'>".mb_strimwidth(io_safe_output($component['description']), 0, 60, '...').'</span>'; $data[3] = "<span class='font_8px'>".mb_strimwidth(io_safe_output($component['description']), 0, 60, '...').'</span>';

View File

@ -496,8 +496,8 @@ if (isset($_GET['server']) === true) {
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
$(document).ready (function () { $(document).ready (function () {
var id_server = '<?php echo $id_server; ?>'; var id_server = '<?php echo ($id_server ?? ''); ?>';
var server_type = '<?php echo $row['server_type']; ?>'; var server_type = '<?php echo ($row['server_type'] ?? ''); ?>';
$("#check_exec_server img").on("click", function () { $("#check_exec_server img").on("click", function () {
$("#check_exec_server img").attr("src", "images/spinner.gif"); $("#check_exec_server img").attr("src", "images/spinner.gif");

View File

@ -1172,6 +1172,10 @@ if (empty($create) === false || empty($view) === false) {
} }
ui_require_javascript_file('pandora_modules'); ui_require_javascript_file('pandora_modules');
if (isset($locked) === false) {
$locked = '';
}
?> ?>
<script type="text/javascript"> <script type="text/javascript">

View File

@ -523,27 +523,29 @@ if ($error === null) {
} }
} }
if (file_exists($uploaded_filename) === true) { if (isset($uploaded_filename) === true) {
if (is_metaconsole() === true && is_management_allowed() === true) { if (file_exists($uploaded_filename) === true) {
// Keep uploaded file to be transferred to nodes. if (is_metaconsole() === true && is_management_allowed() === true) {
if (is_dir($config['attachment_store'].'/downloads/') === false) { // Keep uploaded file to be transferred to nodes.
mkdir($config['attachment_store'].'/downloads/'); if (is_dir($config['attachment_store'].'/downloads/') === false) {
} mkdir($config['attachment_store'].'/downloads/');
}
$keep = move_uploaded_file( $keep = move_uploaded_file(
$uploaded_filename, $uploaded_filename,
$config['attachment_store'].'/downloads/'.$filename $config['attachment_store'].'/downloads/'.$filename
);
if ($keep === false) {
$error = __(
'Cannot move uploaded file to %s.',
$config['attachment_store'].'/downloads/'
); );
if ($keep === false) {
$error = __(
'Cannot move uploaded file to %s.',
$config['attachment_store'].'/downloads/'
);
}
} else {
// Clean temporary files.
unlink($uploaded_filename);
} }
} else {
// Clean temporary files.
unlink($uploaded_filename);
} }
} }

View File

@ -146,9 +146,9 @@ foreach ($servers as $server) {
// Type. // Type.
$data[2] = '<span class="nowrap">'.$server['img'].'&nbsp;&nbsp;&nbsp;&nbsp;'.$server['server_name']; $data[2] = '<span class="nowrap">'.$server['img'].'&nbsp;&nbsp;&nbsp;&nbsp;'.$server['server_name'];
if ($server['master'] == $master) { if ($server['master'] == $master) {
$data[3] .= __('Yes', true); $data[3] = __('Yes', true);
} else { } else {
$data[3] .= __('-'); $data[3] = __('-');
} }
if ((int) $server['exec_proxy'] === 1) { if ((int) $server['exec_proxy'] === 1) {

View File

@ -70,6 +70,10 @@ if (isset($config['filemanager']['message']) === true) {
// Add custom directories here. // Add custom directories here.
$fallback_directory = 'images'; $fallback_directory = 'images';
// Get directory. // Get directory.
if (isset($text) === false) {
$text = '';
}
$directory = (string) get_parameter('directory'); $directory = (string) get_parameter('directory');
$directory = str_replace('&lt;', '', $text); $directory = str_replace('&lt;', '', $text);
$directory = str_replace('&gt;', '', $text); $directory = str_replace('&gt;', '', $text);
@ -90,7 +94,12 @@ $create_text_file = (bool) get_parameter('create_text_file');
$default_real_directory = realpath($config['homedir'].'/'); $default_real_directory = realpath($config['homedir'].'/');
// Remove double dot in filename path. // Remove double dot in filename path.
$file_name = $_FILES['file']['name']; if (isset($_FILES['file']) === true) {
$file_name = $_FILES['file']['name'];
} else {
$file_name = '';
}
$path_parts = explode('/', $file_name); $path_parts = explode('/', $file_name);
$stripped_parts = array_filter( $stripped_parts = array_filter(

View File

@ -399,7 +399,7 @@ $table->data[0][0] = html_print_label_input_block(
__('Total Agents'), __('Total Agents'),
html_print_input_text( html_print_input_text(
'total_agents', 'total_agents',
$total_agents, ($total_agents ?? ''),
'', '',
30, 30,
255, 255,
@ -412,7 +412,7 @@ $table->data[0][1] = html_print_label_input_block(
__('Network & other devices'), __('Network & other devices'),
html_print_input_text( html_print_input_text(
'type_network', 'type_network',
$network_others, ($network_others ?? ''),
'', '',
30, 30,
255, 255,
@ -425,7 +425,7 @@ $table->data[1][0] = html_print_label_input_block(
__('Workstations'), __('Workstations'),
html_print_input_text( html_print_input_text(
'type_workstation', 'type_workstation',
$workstations, ($workstations ?? ''),
'', '',
30, 30,
255, 255,
@ -438,7 +438,7 @@ $table->data[1][1] = html_print_label_input_block(
__('Servers'), __('Servers'),
html_print_input_text( html_print_input_text(
'type_server', 'type_server',
$servers, ($servers ?? ''),
'', '',
30, 30,
255, 255,

View File

@ -389,6 +389,10 @@ if ((isset($_GET['form_add'])) || (isset($_GET['form_edit']))) {
echo '<td>'.__('No').'</b></td>'; echo '<td>'.__('No').'</b></td>';
} }
if (isset($tdcolor) === false) {
$tdcolor = '';
}
echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter main_menu_icon']).'</a></td></tr>'; echo '<td class="'.$tdcolor.' table_action_buttons"><a href="index.php?sec=gsetup&sec2=godmode/setup/news&id_news='.$row['id_news'].'&borrar='.$row['id_news'].'" onClick="if (!confirm(\' '.__('Are you sure?').'\')) return false;">'.html_print_image('images/delete.svg', true, ['border' => '0', 'class' => 'invert_filter main_menu_icon']).'</a></td></tr>';
} }

View File

@ -164,9 +164,8 @@ if (is_metaconsole() === true) {
html_print_action_buttons( html_print_action_buttons(
$buttons, $buttons,
[ [
'type' => 'data_table', 'type' => 'data_table',
'class' => 'fixed_action_buttons', 'class' => 'fixed_action_buttons',
'right_content' => $tablePagination,
] ]
); );

View File

@ -2087,7 +2087,7 @@ if ($create_alert || $update_alert) {
FROM talert_actions FROM talert_actions
ORDER BY name', ORDER BY name',
'alert_type', 'alert_type',
$alert_type, ($alert_type ?? ''),
'', '',
'', '',
0, 0,
@ -2100,26 +2100,26 @@ if ($create_alert || $update_alert) {
echo '</tr>'; echo '</tr>';
$al = [ $al = [
'al_field1' => $al_field1, 'al_field1' => ($al_field1 ?? ''),
'al_field2' => $al_field2, 'al_field2' => ($al_field2 ?? ''),
'al_field3' => $al_field3, 'al_field3' => ($al_field3 ?? ''),
'al_field4' => $al_field4, 'al_field4' => ($al_field4 ?? ''),
'al_field5' => $al_field5, 'al_field5' => ($al_field5 ?? ''),
'al_field6' => $al_field6, 'al_field6' => ($al_field6 ?? ''),
'al_field7' => $al_field7, 'al_field7' => ($al_field7 ?? ''),
'al_field8' => $al_field8, 'al_field8' => ($al_field8 ?? ''),
'al_field9' => $al_field9, 'al_field9' => ($al_field9 ?? ''),
'al_field10' => $al_field10, 'al_field10' => ($al_field10 ?? ''),
'al_field11' => $al_field11, 'al_field11' => ($al_field11 ?? ''),
'al_field12' => $al_field12, 'al_field12' => ($al_field12 ?? ''),
'al_field13' => $al_field13, 'al_field13' => ($al_field13 ?? ''),
'al_field14' => $al_field14, 'al_field14' => ($al_field14 ?? ''),
'al_field15' => $al_field15, 'al_field15' => ($al_field15 ?? ''),
'al_field16' => $al_field16, 'al_field16' => ($al_field16 ?? ''),
'al_field17' => $al_field17, 'al_field17' => ($al_field17 ?? ''),
'al_field18' => $al_field18, 'al_field18' => ($al_field18 ?? ''),
'al_field19' => $al_field19, 'al_field19' => ($al_field19 ?? ''),
'al_field20' => $al_field20, 'al_field20' => ($al_field20 ?? ''),
]; ];
for ($i = 1; $i <= $config['max_macro_fields']; $i++) { for ($i = 1; $i <= $config['max_macro_fields']; $i++) {
@ -2287,7 +2287,7 @@ $(document).ready (function () {
}); });
values.push({ values.push({
name: "content_type", name: "content_type",
value: "<?php echo $al_field4; ?>" value: "<?php echo ($al_field4 ?? ''); ?>"
}) })
jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>, jQuery.post (<?php echo "'".ui_get_full_url('ajax.php', false, false, false)."'"; ?>,

View File

@ -99,7 +99,7 @@ if (!$action_update_url_update_manager) {
); );
$allow_offline_patches = get_parameter_switch( $allow_offline_patches = get_parameter_switch(
'allow_offline_patches', 'allow_offline_patches',
$config['allow_offline_patches'] ($config['allow_offline_patches'] ?? '')
); );
$lts_updates = get_parameter_switch( $lts_updates = get_parameter_switch(
'lts_updates', 'lts_updates',

View File

@ -321,7 +321,7 @@ class Cloud extends Wizard
ui_print_error_message($this->msg); ui_print_error_message($this->msg);
} }
if ($empty_account === true) { if (isset($empty_account) === true) {
ui_print_error_message($this->msg); ui_print_error_message($this->msg);
} }
@ -357,7 +357,7 @@ class Cloud extends Wizard
'name' => 'account_identifier', 'name' => 'account_identifier',
'type' => 'select', 'type' => 'select',
'fields' => CredentialStore::getKeys($this->keyStoreType), 'fields' => CredentialStore::getKeys($this->keyStoreType),
'selected' => $this->keyIdentifier, 'selected' => (isset($this->keyIdentifier) === true) ? $this->keyIdentifier : '',
'return' => true, 'return' => true,
], ],
], ],
@ -419,7 +419,7 @@ class Cloud extends Wizard
return false; return false;
} }
if ($this->keyIdentifier === null) { if (isset($this->keyIdentifier) === false) {
// Ask user for available credentials. // Ask user for available credentials.
$this->msg = __('Select a set of credentials from the list'); $this->msg = __('Select a set of credentials from the list');
$this->status = null; $this->status = null;
@ -496,7 +496,7 @@ class Cloud extends Wizard
*/ */
public function getCredentials() public function getCredentials()
{ {
return CredentialStore::getKey($this->keyIdentifier); return CredentialStore::getKey((isset($this->keyIdentifier) === true) ? $this->keyIdentifier : '');
} }

View File

@ -71,7 +71,7 @@ if ($get_all_datatables_formatted === true) {
// Datatables format: RecordsTotal && recordsfiltered. // Datatables format: RecordsTotal && recordsfiltered.
echo json_encode( echo json_encode(
[ [
'data' => $data, 'data' => ($data ?? ''),
'recordsTotal' => $count, 'recordsTotal' => $count,
'recordsFiltered' => $count, 'recordsFiltered' => $count,
] ]

View File

@ -410,7 +410,7 @@ class Diagnostics extends Wizard
], ],
]; ];
$return .= '<div class="title-self-monitoring">'; $return = '<div class="title-self-monitoring">';
$return .= __( $return .= __(
'Graphs modules that represent the self-monitoring system' 'Graphs modules that represent the self-monitoring system'
); );
@ -423,7 +423,7 @@ class Diagnostics extends Wizard
$return .= '</div>'; $return .= '</div>';
} }
return $return; return ($return ?? '');
} }
@ -1848,6 +1848,10 @@ class Diagnostics extends Wizard
$sizeServerLog = number_format($fileSize); $sizeServerLog = number_format($fileSize);
$sizeServerLog = (0 + str_replace(',', '', $sizeServerLog)); $sizeServerLog = (0 + str_replace(',', '', $sizeServerLog));
if (isset($config['thousand_separator']) === false) {
$config['thousand_separator'] = '';
}
$value = number_format(($fileSize / $mega), 3, $config['decimal_separator'], $config['thousand_separator']); $value = number_format(($fileSize / $mega), 3, $config['decimal_separator'], $config['thousand_separator']);
$message = __('You have more than 10 MB of logs'); $message = __('You have more than 10 MB of logs');
$status = 0; $status = 0;

View File

@ -427,30 +427,32 @@ class EventSound extends HTML
); );
$data = db_get_all_rows_sql($sql); $data = db_get_all_rows_sql($sql);
foreach ($data as $key => $row) { if ($data !== false) {
if ($row['active'] === '1') { foreach ($data as $key => $row) {
$img = 'images/lightbulb.png'; if ($row['active'] === '1') {
$action = __('Disable sound'); $img = 'images/lightbulb.png';
$new_action = 0; $action = __('Disable sound');
} else { $new_action = 0;
$img = 'images/lightbulb_off.png'; } else {
$action = __('Enable sound'); $img = 'images/lightbulb_off.png';
$new_action = 1; $action = __('Enable sound');
$new_action = 1;
}
$options = '<a href="index.php?sec=eventos&sec2=godmode/events/configuration_sounds';
$options .= '&action=change_action&id='.$row['id'].'&set_action='.$new_action.'">';
$options .= html_print_image(
$img,
true,
[
'title' => $action,
'class' => 'main_menu_icon invert_filter',
]
);
$options .= '</a>';
$data[$key]['options'] = $options;
} }
$options = '<a href="index.php?sec=eventos&sec2=godmode/events/configuration_sounds';
$options .= '&action=change_action&id='.$row['id'].'&set_action='.$new_action.'">';
$options .= html_print_image(
$img,
true,
[
'title' => $action,
'class' => 'main_menu_icon invert_filter',
]
);
$options .= '</a>';
$data[$key]['options'] = $options;
} }
echo json_encode( echo json_encode(

View File

@ -417,7 +417,10 @@ class ExtensionsDiscovery extends Wizard
public function loadIni() public function loadIni()
{ {
global $config; global $config;
$iniFile = parse_ini_file($config['homedir'].$this->path.'/'.$this->mode.'/discovery_definition.ini', true, INI_SCANNER_TYPED); $iniFile = false;
if (file_exists($config['homedir'].$this->path.'/'.$this->mode.'/discovery_definition.ini') === true) {
$iniFile = parse_ini_file($config['homedir'].$this->path.'/'.$this->mode.'/discovery_definition.ini', true, INI_SCANNER_TYPED);
}
return $iniFile; return $iniFile;
} }

View File

@ -218,6 +218,10 @@ class HTML
$class = ''; $class = '';
} }
if (isset($url['link']) === false) {
$url['link'] = '';
}
$bc[$i] = ''; $bc[$i] = '';
$bc[$i] .= '<span><a class="breadcrumb_link '.$class.'" href="'.$url['link'].'">'; $bc[$i] .= '<span><a class="breadcrumb_link '.$class.'" href="'.$url['link'].'">';
$bc[$i] .= $url['label']; $bc[$i] .= $url['label'];

View File

@ -780,8 +780,13 @@ class ModuleTemplates extends HTML
private function setNetworkProfile() private function setNetworkProfile()
{ {
$profileInfo = db_get_row('tnetwork_profile', 'id_np', $this->id_np); $profileInfo = db_get_row('tnetwork_profile', 'id_np', $this->id_np);
$this->name = $profileInfo['name']; if ($profileInfo !== false) {
$this->description = $profileInfo['description']; $this->name = $profileInfo['name'];
$this->description = $profileInfo['description'];
} else {
$this->name = '';
$this->description = '';
}
$penInfo = db_get_all_rows_filter('tnetwork_profile_pen', ['id_np' => $this->id_np]); $penInfo = db_get_all_rows_filter('tnetwork_profile_pen', ['id_np' => $this->id_np]);
$penList = []; $penList = [];

View File

@ -526,8 +526,10 @@ function filemanager_file_explorer(
$allowCreateText = (isset($options['all']) === true) || ((isset($options['allowCreateText']) === true) && ($options['allowCreateText'] === true)); $allowCreateText = (isset($options['all']) === true) || ((isset($options['allowCreateText']) === true) && ($options['allowCreateText'] === true));
$allowCreateFolder = (isset($options['allowCreateFolder'])) ? false : true; $allowCreateFolder = (isset($options['allowCreateFolder'])) ? false : true;
if ($options['denyCreateText'] === true) { if (isset($options['denyCreateText']) === true) {
$allowCreateText = false; if ($options['denyCreateText'] === true) {
$allowCreateText = false;
}
} }
if ($homedir_filemanager === false) { if ($homedir_filemanager === false) {

View File

@ -5578,7 +5578,7 @@ function html_print_input($data, $wrapper='div', $input_only=false)
$output .= html_print_input_image( $output .= html_print_input_image(
((isset($data['name']) === true) ? $data['name'] : ''), ((isset($data['name']) === true) ? $data['name'] : ''),
$data['src'], $data['src'],
$data['value'], ($data['value'] ?? ''),
((isset($data['style']) === true) ? $data['style'] : ''), ((isset($data['style']) === true) ? $data['style'] : ''),
((isset($data['return']) === true) ? $data['return'] : false), ((isset($data['return']) === true) ? $data['return'] : false),
((isset($data['options']) === true) ? $data['options'] : false) ((isset($data['options']) === true) ? $data['options'] : false)
@ -5818,7 +5818,7 @@ function html_print_input($data, $wrapper='div', $input_only=false)
case 'checkbox': case 'checkbox':
$output .= html_print_checkbox( $output .= html_print_checkbox(
$data['name'], ((isset($data['name']) === true) ? $data['name'] : ''),
($data['value'] ?? null), ($data['value'] ?? null),
((isset($data['checked']) === true) ? $data['checked'] : false), ((isset($data['checked']) === true) ? $data['checked'] : false),
((isset($data['return']) === true) ? $data['return'] : false), ((isset($data['return']) === true) ? $data['return'] : false),

View File

@ -699,9 +699,9 @@ function menu_get_sec($with_categories=false)
} }
$sec_array[$k]['optgroup'] = $category; $sec_array[$k]['optgroup'] = $category;
$sec_array[$k]['name'] = $v['text']; $sec_array[$k]['name'] = (isset($v['text']) === true) ? $v['text'] : '';
} else { } else {
$sec_array[$k] = $v['text']; $sec_array[$k] = (isset($v['text']) === true) ? $v['text'] : '';
} }
} }

View File

@ -70,7 +70,12 @@ $agents = agents_get_agents(
['nombre LIKE "'.$agentName.'"'], ['nombre LIKE "'.$agentName.'"'],
['id_agente'] ['id_agente']
); );
$agent = $agents[0]['id_agente'];
if ($agents !== false) {
$agent = $agents[0]['id_agente'];
} else {
$agent = '';
}
$module = (array) get_parameter_post('module_arr', []); $module = (array) get_parameter_post('module_arr', []);
$start_date = get_parameter_post('start_date', 0); $start_date = get_parameter_post('start_date', 0);
@ -292,7 +297,8 @@ if (empty($export_btn) || $show_form) {
break; break;
default: default:
continue; // Nothing.
break;
} }
$i++; $i++;