#12460 fixed deprecated log
This commit is contained in:
parent
a31f964753
commit
bb2d908de7
|
@ -37,6 +37,20 @@ class Applications extends Wizard
|
|||
*/
|
||||
public $mode;
|
||||
|
||||
/**
|
||||
* Task properties.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $task;
|
||||
|
||||
/**
|
||||
* Class of styles.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $class;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
@ -37,6 +37,20 @@ class Custom extends Wizard
|
|||
*/
|
||||
public $mode;
|
||||
|
||||
/**
|
||||
* Task properties.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $task;
|
||||
|
||||
/**
|
||||
* Class of styles.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $class;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
@ -47,6 +47,13 @@ ui_require_javascript_file('simTree');
|
|||
class DiscoveryTaskList extends HTML
|
||||
{
|
||||
|
||||
/**
|
||||
* Task properties.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $task;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
|
@ -517,7 +517,7 @@ class Wizard
|
|||
public static function printBigButtonsList($list_data)
|
||||
{
|
||||
echo '<ul class="bigbuttonlist">';
|
||||
array_map('self::printBigButtonElement', $list_data);
|
||||
array_map(['Wizard', 'printBigButtonElement'], $list_data);
|
||||
echo '</ul>';
|
||||
}
|
||||
|
||||
|
|
|
@ -380,5 +380,7 @@ if (session_status() !== PHP_SESSION_DISABLED) {
|
|||
// Could give a warning if no session file is created. Ignore.
|
||||
@session_destroy();
|
||||
header_remove('Set-Cookie');
|
||||
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
||||
if (isset($_COOKIE[session_name()]) === true) {
|
||||
setcookie(session_name(), $_COOKIE[session_name()], (time() - 4800), '/');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -575,7 +575,7 @@ function get_user_info($user)
|
|||
function get_users($order='fullname', $filter=false, $fields=false)
|
||||
{
|
||||
if (is_array($order) === true) {
|
||||
$filter['order'] = $order['field'].' '.$order['order'];
|
||||
$filter['order'] = (string) $order['field'].' '.(string) $order['order'];
|
||||
} else {
|
||||
if ($order !== 'registered' || $order !== 'last_connect' || $order !== 'fullname') {
|
||||
$order = 'fullname';
|
||||
|
|
|
@ -6471,7 +6471,8 @@ function event_print_graph(
|
|||
];
|
||||
$color[] = '#82b92f';
|
||||
}
|
||||
} else {
|
||||
} else if ((int) $num_intervals > 0) {
|
||||
// We assume that if num_interval is 0, not exist events.
|
||||
$interval_length = (int) ($period / $num_intervals);
|
||||
$intervals = [];
|
||||
$intervals[0] = $start_utimestamp;
|
||||
|
|
|
@ -147,11 +147,7 @@ function ui_print_truncate_text(
|
|||
$text_html_decoded = io_safe_output($text);
|
||||
$text_has_entities = $text != $text_html_decoded;
|
||||
|
||||
if ($text_html_decoded === null) {
|
||||
$text_html_decoded = '';
|
||||
}
|
||||
|
||||
if (mb_strlen($text_html_decoded, 'UTF-8') > ($numChars)) {
|
||||
if (isset($text_html_decoded) === true && mb_strlen($text_html_decoded, 'UTF-8') > ($numChars)) {
|
||||
// '/2' because [...] is in the middle of the word.
|
||||
$half_length = intval(($numChars - 3) / 2);
|
||||
|
||||
|
|
|
@ -83,7 +83,11 @@ class SnmpTraps extends Element
|
|||
{
|
||||
if ($this->isEnabled() === true) {
|
||||
$value = $this->valueMonitoring('snmp_trap_queue');
|
||||
$total = round($value[0]['data']);
|
||||
if (isset($value[0]['data']) === true) {
|
||||
$total = round($value[0]['data']);
|
||||
} else {
|
||||
$total = __('N/A');
|
||||
}
|
||||
} else {
|
||||
$total = __('N/A');
|
||||
}
|
||||
|
@ -109,7 +113,11 @@ class SnmpTraps extends Element
|
|||
{
|
||||
if ($this->isEnabled() === true) {
|
||||
$value = $this->valueMonitoring('total_trap');
|
||||
$total = round($value[0]['data']);
|
||||
if (isset($value[0]['data']) === true) {
|
||||
$total = round($value[0]['data']);
|
||||
} else {
|
||||
$total = __('N/A');
|
||||
}
|
||||
} else {
|
||||
$total = __('N/A');
|
||||
}
|
||||
|
|
|
@ -505,7 +505,7 @@ if (is_ajax() === true) {
|
|||
}
|
||||
}
|
||||
|
||||
if (strlen(($tmp->server_name ?? '')) >= 10) {
|
||||
if (isset($tmp->server_name) === true && strlen($tmp->server_name) >= 10) {
|
||||
$tmp->server_name = ui_print_truncate_text(
|
||||
$tmp->server_name,
|
||||
10,
|
||||
|
@ -1216,7 +1216,7 @@ if (is_ajax() === true) {
|
|||
if (empty($tmp) === false && $regex !== '') {
|
||||
$regex_validation = false;
|
||||
foreach (json_decode(json_encode($tmp), true) as $key => $field) {
|
||||
if (preg_match('/'.$regex.'/', $field)) {
|
||||
if (isset($field) === true && preg_match('/'.$regex.'/', $field)) {
|
||||
$regex_validation = true;
|
||||
}
|
||||
}
|
||||
|
@ -1234,7 +1234,7 @@ if (is_ajax() === true) {
|
|||
|
||||
$data = array_values(
|
||||
array_filter(
|
||||
$data,
|
||||
((is_array($data) === true) ? $data : []),
|
||||
function ($item) {
|
||||
return (bool) (array) $item;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue