#12695 wip removing warnings
This commit is contained in:
parent
2246fd8049
commit
9084a34514
|
@ -273,6 +273,14 @@ function buildConnectionURL($method)
|
|||
{
|
||||
global $config;
|
||||
|
||||
if (isset($config['gotty_ssh_use_ssl']) === false) {
|
||||
$config['gotty_ssh_use_ssl'] = '';
|
||||
}
|
||||
|
||||
if (isset($config['gotty_telnet_use_ssl']) === false) {
|
||||
$config['gotty_telnet_use_ssl'] = '';
|
||||
}
|
||||
|
||||
$address = (empty($config['gotty_addr']) === true) ? $_SERVER['SERVER_ADDR'] : $config['gotty_addr'];
|
||||
$use_ssl = ($method === 'ssh') ? $config['gotty_ssh_use_ssl'] : $config['gotty_telnet_use_ssl'];
|
||||
$protocol = ((bool) $use_ssl === true) ? 'https://' : 'http://';
|
||||
|
@ -353,6 +361,18 @@ function quickShellSettings()
|
|||
config_update_value('gotty_telnet_enabled', $gotty_telnet_enabled);
|
||||
}
|
||||
|
||||
if (isset($config['gotty_addr']) === false) {
|
||||
$config['gotty_addr'] = '';
|
||||
}
|
||||
|
||||
if (isset($config['gotty_ssh_use_ssl']) === false) {
|
||||
$config['gotty_ssh_use_ssl'] = '';
|
||||
}
|
||||
|
||||
if (isset($config['gotty_telnet_use_ssl']) === false) {
|
||||
$config['gotty_telnet_use_ssl'] = '';
|
||||
}
|
||||
|
||||
if ($config['gotty_addr'] != $gotty_addr) {
|
||||
config_update_value('gotty_addr', $gotty_addr);
|
||||
}
|
||||
|
@ -389,6 +409,25 @@ function quickShellSettings()
|
|||
$general_table->data = [];
|
||||
$general_table->style = [];
|
||||
$general_table->style[0] = 'width: 50%;';
|
||||
if (isset($config['gotty_addr']) === false) {
|
||||
$config['gotty_addr'] = '';
|
||||
}
|
||||
|
||||
if (isset($config['gotty_ssh_enabled']) === false) {
|
||||
$config['gotty_ssh_enabled'] = '';
|
||||
}
|
||||
|
||||
if (isset($config['gotty_ssh_use_ssl']) === false) {
|
||||
$config['gotty_ssh_use_ssl'] = '';
|
||||
}
|
||||
|
||||
if (isset($disable_agentaccess) === false) {
|
||||
$disable_agentaccess = '';
|
||||
}
|
||||
|
||||
if (isset($config['gotty_telnet_use_ssl']) === false) {
|
||||
$config['gotty_telnet_use_ssl'] = '';
|
||||
}
|
||||
|
||||
$general_table->data[0][] = html_print_label_input_block(
|
||||
__('Address'),
|
||||
|
|
|
@ -246,6 +246,7 @@ if ($new_agent === true) {
|
|||
|
||||
|
||||
// QR Code table.
|
||||
$CodeQRContent = '';
|
||||
if ($new_agent === false) {
|
||||
$CodeQRContent .= html_print_div(['id' => 'qr_container_image'], true);
|
||||
$CodeQRContent .= html_print_anchor(
|
||||
|
|
|
@ -413,15 +413,19 @@ if (isset($config['error_config_update_config'])) {
|
|||
ui_print_success_message(__('Correct update the setup options'));
|
||||
}
|
||||
|
||||
if (is_array($config['error_config_update_config']['errors']) === true) {
|
||||
foreach ($config['error_config_update_config']['errors'] as $msg) {
|
||||
ui_print_error_message($msg);
|
||||
if (isset($config['error_config_update_config']['errors']) === true) {
|
||||
if (is_array($config['error_config_update_config']['errors']) === true) {
|
||||
foreach ($config['error_config_update_config']['errors'] as $msg) {
|
||||
ui_print_error_message($msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($config['error_config_update_config']['warnings']) === true) {
|
||||
foreach ($config['error_config_update_config']['warnings'] as $msg) {
|
||||
ui_print_warning_message($msg);
|
||||
if (isset($config['error_config_update_config']['warnings']) === true) {
|
||||
if (is_array($config['error_config_update_config']['warnings']) === true) {
|
||||
foreach ($config['error_config_update_config']['warnings'] as $msg) {
|
||||
ui_print_warning_message($msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,6 +137,10 @@ $row['hostname'] = html_print_label_input_block(
|
|||
['div_class' => 'ITSM-remote-setup-ITSM_hostname']
|
||||
);
|
||||
|
||||
if (isset($config['ITSM_token']) === false) {
|
||||
$config['ITSM_token'] = '';
|
||||
}
|
||||
|
||||
// ITSM token.
|
||||
$row['password'] = html_print_label_input_block(
|
||||
__('Token'),
|
||||
|
|
|
@ -390,7 +390,7 @@ if (is_ajax() === true) {
|
|||
set_unless_defined($config['double_auth_enabled'], false);
|
||||
$row = [];
|
||||
$row['name'] = __('Double authentication');
|
||||
$row['control'] .= html_print_checkbox_switch(
|
||||
$row['control'] = html_print_checkbox_switch(
|
||||
'double_auth_enabled',
|
||||
1,
|
||||
$config['double_auth_enabled'],
|
||||
|
@ -405,7 +405,7 @@ if (is_ajax() === true) {
|
|||
set_unless_defined($config['2FA_all_users'], false);
|
||||
$row = [];
|
||||
$row['name'] = __('Force 2FA for all users is enabled');
|
||||
$row['control'] .= html_print_checkbox_switch(
|
||||
$row['control'] = html_print_checkbox_switch(
|
||||
'2FA_all_users',
|
||||
1,
|
||||
$config['2FA_all_users'],
|
||||
|
|
|
@ -78,6 +78,18 @@ $table_remote->class = 'databox filters filter-table-adv';
|
|||
$table_remote->size['ehorus_hostname'] = '50%';
|
||||
$table_remote->size['ehorus_port'] = '50%';
|
||||
|
||||
if (isset($config['ehorus_user_level_conf']) === false) {
|
||||
$config['ehorus_user_level_conf'] = '';
|
||||
}
|
||||
|
||||
if (isset($config['ehorus_user']) === false) {
|
||||
$config['ehorus_user'] = '';
|
||||
}
|
||||
|
||||
if (isset($config['ehorus_pass']) === false) {
|
||||
$config['ehorus_pass'] = '';
|
||||
}
|
||||
|
||||
// Enable eHorus user configuration.
|
||||
$row = [];
|
||||
$row['ehorus_user_level_conf'] = html_print_label_input_block(
|
||||
|
|
|
@ -488,6 +488,10 @@ $table->data[$i][] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
if (isset($config['force_public_url']) === false) {
|
||||
$config['force_public_url'] = '';
|
||||
}
|
||||
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Force use Public URL'),
|
||||
html_print_switch(
|
||||
|
@ -498,6 +502,10 @@ $table->data[$i++][] = html_print_label_input_block(
|
|||
)
|
||||
);
|
||||
|
||||
if (isset($config['public_url_exclusions']) === false) {
|
||||
$config['public_url_exclusions'] = '';
|
||||
}
|
||||
|
||||
$table->data[$i++][] = html_print_label_input_block(
|
||||
__('Public URL host exclusions'),
|
||||
html_print_textarea(
|
||||
|
@ -919,6 +927,10 @@ echo '<legend>'.__('Mail configuration').'</legend>';
|
|||
$table_ncm_config->size[0] = '50%';
|
||||
$table_ncm_config->data = [];
|
||||
|
||||
if (isset($config['tftp_server_ip']) === false) {
|
||||
$config['tftp_server_ip'] = '';
|
||||
}
|
||||
|
||||
$table_ncm_config->data[0][] = html_print_label_input_block(
|
||||
__('FTP server IP').ui_print_help_tip(__('This value will be used by TFTP_SERVER_IP macro in NCM scripts.'), true),
|
||||
html_print_input_text(
|
||||
|
|
|
@ -74,6 +74,8 @@ if ($view === 'create' || $view === 'edit') {
|
|||
if (count($errors) === 0) {
|
||||
if (count($files) > 0) {
|
||||
$uploadImages = $tipsWindow->uploadImages($files);
|
||||
} else {
|
||||
$uploadImages = '';
|
||||
}
|
||||
|
||||
$response = $tipsWindow->createTip($id_lang, $id_profile, $title, $text, $url, $enable, $uploadImages);
|
||||
|
|
|
@ -377,11 +377,15 @@ if ($edit_filter > -2) {
|
|||
|
||||
echo '</form></div>';
|
||||
}
|
||||
|
||||
if (isset($index) === false) {
|
||||
$index = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
// +1 because there is already a defined 'filter' field.
|
||||
var id = parseInt("<?php echo $index; ?>")+1;
|
||||
var id = parseInt("<?php echo $index; ?>")+1;
|
||||
var homeurl = "<?php echo $config['homeurl']; ?>";
|
||||
|
||||
$(document).ready (function () {
|
||||
|
|
|
@ -1113,11 +1113,15 @@ if (!$new_user) {
|
|||
|
||||
$user_id .= $apiTokenContent;
|
||||
|
||||
$CodeQRContent .= html_print_div(['id' => 'qr_container_image', 'class' => 'scale-0-8'], true);
|
||||
$CodeQRContent = html_print_div(['id' => 'qr_container_image', 'class' => 'scale-0-8'], true);
|
||||
$CodeQRContent .= html_print_anchor(
|
||||
['id' => 'qr_code_agent_view'],
|
||||
true
|
||||
);
|
||||
if (isset($custom_id_div) === false) {
|
||||
$custom_id_div = '';
|
||||
}
|
||||
|
||||
$CodeQRContent .= '<br/>'.$custom_id_div;
|
||||
|
||||
// QR code div.
|
||||
|
@ -1581,7 +1585,12 @@ $autorefresh_list_out['operation/events/events'] = 'Events';
|
|||
|
||||
if (isset($autorefresh_list) === false || empty($autorefresh_list) === true || empty($autorefresh_list[0]) === true) {
|
||||
$select = db_process_sql("SELECT autorefresh_white_list FROM tusuario WHERE id_user = '".$id."'");
|
||||
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
|
||||
if (isset($select[0]['autorefresh_white_list']) === true) {
|
||||
$autorefresh_list = json_decode($select[0]['autorefresh_white_list']);
|
||||
} else {
|
||||
$autorefresh_list = 0;
|
||||
}
|
||||
|
||||
if ($autorefresh_list === null || $autorefresh_list === 0) {
|
||||
$autorefresh_list = [];
|
||||
$autorefresh_list[0] = __('None');
|
||||
|
|
|
@ -64,6 +64,16 @@ if ($dashboards === false) {
|
|||
}
|
||||
}
|
||||
|
||||
$layouts = visual_map_get_user_layouts($config['id_user'], true);
|
||||
$layouts_aux = [];
|
||||
if ($layouts === false) {
|
||||
$layouts_aux = ['None' => 'None'];
|
||||
} else {
|
||||
foreach ($layouts as $layout) {
|
||||
$layouts_aux[$layout] = $layout;
|
||||
}
|
||||
}
|
||||
|
||||
// Custom Home Screen controls.
|
||||
$customHomeScreenAddition = [];
|
||||
// Home screen. Dashboard.
|
||||
|
@ -81,21 +91,12 @@ $customHomeScreenAddition[HOME_SCREEN_DASHBOARD] = html_print_select(
|
|||
false,
|
||||
'width: 100%'
|
||||
);
|
||||
|
||||
// Home screen. Visual consoles.
|
||||
$customHomeScreenAddition[HOME_SCREEN_VISUAL_CONSOLE] = html_print_select($layouts_aux, 'visual_console', $user_info['data_section'], '', '', '', true, false, true, 'w100p', false, 'width: 100%');
|
||||
// Home screen. External link and Other.
|
||||
$customHomeScreenAddition[HOME_SCREEN_EXTERNAL_LINK] = html_print_input_text('data_section', $user_info['data_section'], '', 60, 400, true);
|
||||
|
||||
$layouts = visual_map_get_user_layouts($config['id_user'], true);
|
||||
$layouts_aux = [];
|
||||
if ($layouts === false) {
|
||||
$layouts_aux = ['None' => 'None'];
|
||||
} else {
|
||||
foreach ($layouts as $layout) {
|
||||
$layouts_aux[$layout] = $layout;
|
||||
}
|
||||
}
|
||||
|
||||
// Home screen. Visual consoles.
|
||||
$customHomeScreenAddition[HOME_SCREEN_VISUAL_CONSOLE] = html_print_select(
|
||||
$layouts_aux,
|
||||
|
@ -889,7 +890,7 @@ if (users_is_admin($config['id_user']) === true || (bool) check_acl($config['id_
|
|||
true
|
||||
);
|
||||
|
||||
$userManagementTable->data['fields_addSettings'][1] .= html_print_div(
|
||||
$userManagementTable->data['fields_addSettings'][1] = html_print_div(
|
||||
[
|
||||
'class' => 'edit_user_allowed_ip '.(((int) $user_info['allowed_ip_active'] === 1) ? '' : 'invisible'),
|
||||
'content' => html_print_textarea(
|
||||
|
@ -914,6 +915,7 @@ if (users_is_admin($config['id_user']) === true || (bool) check_acl($config['id_
|
|||
);
|
||||
}
|
||||
|
||||
$ITSM_host = '';
|
||||
if ($config['ITSM_enabled'] && $config['ITSM_user_level_conf']) {
|
||||
// Pandora ITSM user remote login.
|
||||
$table_ITSM = new StdClass();
|
||||
|
|
|
@ -646,7 +646,7 @@ class TipsWindow
|
|||
['class' => 'main_menu_icon']
|
||||
);
|
||||
$data[$key]['edit'] .= '</a>';
|
||||
$data[$key]['delete'] .= '<form name="grupo" method="post" class="rowPair table_action_buttons" action="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&action=delete">';
|
||||
$data[$key]['delete'] = '<form name="grupo" method="post" class="rowPair table_action_buttons" action="index.php?sec=gsetup&sec2=godmode/setup/setup§ion=welcome_tips&action=delete">';
|
||||
$data[$key]['delete'] .= html_print_input_image(
|
||||
'button_delete_tip',
|
||||
'images/delete.svg',
|
||||
|
@ -1087,7 +1087,7 @@ class TipsWindow
|
|||
return false;
|
||||
}
|
||||
|
||||
if ($images !== null) {
|
||||
if ($images !== '') {
|
||||
foreach ($images as $key => $image) {
|
||||
$res = db_process_sql_insert(
|
||||
'twelcome_tip_file',
|
||||
|
|
|
@ -1065,8 +1065,10 @@ function filemanager_file_explorer(
|
|||
$modal_real_path = "<div><b>Real path to plugin execution is:</b></div>
|
||||
<div id='real_path'></div>";
|
||||
|
||||
if (isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['SERVER_NAME'] == '127.0.0.1') {
|
||||
$modal_real_path .= "<div style='float:right;margin: 5em 0 0 auto';>".html_print_submit_button(__('Copy'), 'submit', false, ['icon' => 'wand', 'mode' => 'mini'], true).'</div>';
|
||||
if (isset($_SERVER['HTTPS']) === true) {
|
||||
if ($_SERVER['HTTPS'] == 'on' || $_SERVER['SERVER_NAME'] == 'localhost' || $_SERVER['SERVER_NAME'] == '127.0.0.1') {
|
||||
$modal_real_path .= "<div style='float:right;margin: 5em 0 0 auto';>".html_print_submit_button(__('Copy'), 'submit', false, ['icon' => 'wand', 'mode' => 'mini'], true).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
html_print_div(
|
||||
|
|
|
@ -43,6 +43,9 @@ class ITSM
|
|||
|
||||
$this->userLevelConf = (bool) $config['ITSM_user_level_conf'];
|
||||
$this->url = ($host ?? $config['ITSM_hostname']);
|
||||
if (isset($config['ITSM_token']) === false) {
|
||||
$config['ITSM_token'] = '';
|
||||
}
|
||||
|
||||
$this->userBearer = ($token ?? $config['ITSM_token']);
|
||||
if ($this->userLevelConf === true) {
|
||||
|
|
|
@ -197,6 +197,10 @@ class Database extends Element
|
|||
$string_reads = [];
|
||||
$total = 0;
|
||||
foreach ($reads as $key => $read) {
|
||||
if (isset($read['utimestamp']) === false) {
|
||||
$read['utimestamp'] = '';
|
||||
}
|
||||
|
||||
$dates[] = date('d-m-Y H:i:s', $read['utimestamp']);
|
||||
$string_reads[] = $read['datos'];
|
||||
$total += $read['datos'];
|
||||
|
@ -272,6 +276,10 @@ class Database extends Element
|
|||
$string_writes = [];
|
||||
$total = 0;
|
||||
foreach ($writes as $key => $write) {
|
||||
if (isset($write['utimestamp']) === false) {
|
||||
$write['utimestamp'] = '';
|
||||
}
|
||||
|
||||
$dates[] = date('d-m-Y H:i:s', $write['utimestamp']);
|
||||
$string_writes[] = $write['datos'];
|
||||
$total += $write['datos'];
|
||||
|
|
|
@ -1570,6 +1570,10 @@ echo '</html>';
|
|||
$run_time = format_numeric((microtime(true) - $config['start_time']), 3);
|
||||
echo "\n<!-- Page generated in ".$run_time." seconds -->\n";
|
||||
|
||||
if (isset($_GET['logged']) === false) {
|
||||
$_GET['logged'] = '';
|
||||
}
|
||||
|
||||
// Values from PHP to be recovered from JAVASCRIPT.
|
||||
require 'include/php_to_js_values.php';
|
||||
?>
|
||||
|
|
|
@ -30,6 +30,10 @@ if (isset($preview) === false) {
|
|||
$preview = '';
|
||||
}
|
||||
|
||||
if (isset($id) === false) {
|
||||
$id = '';
|
||||
}
|
||||
|
||||
$output = '';
|
||||
$output .= '<script>var idTips = ['.$id.'];</script>';
|
||||
$output .= '<div class="window">';
|
||||
|
@ -63,8 +67,10 @@ if ($files !== false) {
|
|||
}
|
||||
|
||||
if (isset($files64) === true) {
|
||||
foreach ($files64 as $key => $file) {
|
||||
$output .= '<img src="'.$file.'" />';
|
||||
if ($files64 !== false) {
|
||||
foreach ($files64 as $key => $file) {
|
||||
$output .= '<img src="'.$file.'" />';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue