mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-03 03:55:01 +02:00
fixed warnings php
This commit is contained in:
parent
12faad0217
commit
57990d80a8
@ -1630,7 +1630,7 @@ function config_process_config () {
|
|||||||
if ($is_user_updating == 'operation/users/user_edit') {
|
if ($is_user_updating == 'operation/users/user_edit') {
|
||||||
$id = get_parameter_get ("id", $config["id_user"]); // ID given as parameter
|
$id = get_parameter_get ("id", $config["id_user"]); // ID given as parameter
|
||||||
$user_info = get_user_info ($id);
|
$user_info = get_user_info ($id);
|
||||||
|
|
||||||
//If current user is editing himself or if the user has UM (User Management) rights on any groups the user is part of AND the authorization scheme allows for users/admins to update info
|
//If current user is editing himself or if the user has UM (User Management) rights on any groups the user is part of AND the authorization scheme allows for users/admins to update info
|
||||||
if (($config["id_user"] == $id || check_acl ($config["id_user"], users_get_groups ($id), "UM")) && $config["user_can_update_info"]) {
|
if (($config["id_user"] == $id || check_acl ($config["id_user"], users_get_groups ($id), "UM")) && $config["user_can_update_info"]) {
|
||||||
$view_mode = false;
|
$view_mode = false;
|
||||||
|
@ -2552,7 +2552,9 @@ function modules_get_modules_name ($sql_from , $sql_conditions = '', $meta = fal
|
|||||||
foreach ($rows_temp as $module_group_key => $modules_group_val)
|
foreach ($rows_temp as $module_group_key => $modules_group_val)
|
||||||
$rows_temp_processed[$modules_group_val['name']] = $modules_group_val['name'];
|
$rows_temp_processed[$modules_group_val['name']] = $modules_group_val['name'];
|
||||||
|
|
||||||
$rows_select = array_unique(array_merge($rows_select, $rows_temp_processed));
|
if(is_array($rows_select) && is_array($rows_temp_processed)){
|
||||||
|
$rows_select = array_unique(array_merge($rows_select, $rows_temp_processed));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$groups_temp = users_get_groups_for_select(false, "AR", true, true, false);
|
$groups_temp = users_get_groups_for_select(false, "AR", true, true, false);
|
||||||
@ -2565,7 +2567,9 @@ function modules_get_modules_name ($sql_from , $sql_conditions = '', $meta = fal
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($groups_temp_processed)) {
|
if (!empty($groups_temp_processed)) {
|
||||||
$groups_select = array_unique(array_merge($groups_select, $groups_temp_processed));
|
if(is_array($rows_select) && is_array($rows_temp_processed)){
|
||||||
|
$groups_select = array_unique(array_merge($groups_select, $groups_temp_processed));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($modules_temp))
|
if (!empty($modules_temp))
|
||||||
@ -2574,7 +2578,13 @@ function modules_get_modules_name ($sql_from , $sql_conditions = '', $meta = fal
|
|||||||
metaconsole_restore_db();
|
metaconsole_restore_db();
|
||||||
}
|
}
|
||||||
unset($groups_select[__('All')]);
|
unset($groups_select[__('All')]);
|
||||||
$key_group_all = array_search(__('All'), $groups_select);
|
if(is_array($groups_select)){
|
||||||
|
$key_group_all = array_search(__('All'), $groups_select);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$key_group_all = false;
|
||||||
|
}
|
||||||
|
|
||||||
if ($key_group_all !== false)
|
if ($key_group_all !== false)
|
||||||
unset($groups_select[$key_group_all]);
|
unset($groups_select[$key_group_all]);
|
||||||
return $modules;
|
return $modules;
|
||||||
|
@ -3625,7 +3625,7 @@ function reporting_get_total_servers ($num_servers) {
|
|||||||
|
|
||||||
function reporting_get_events ($data, $links = false) {
|
function reporting_get_events ($data, $links = false) {
|
||||||
global $config;
|
global $config;
|
||||||
|
$table_events = new stdClass();
|
||||||
$table_events->width = "100%";
|
$table_events->width = "100%";
|
||||||
if (defined('METACONSOLE'))
|
if (defined('METACONSOLE'))
|
||||||
$style = " vertical-align:middle;";
|
$style = " vertical-align:middle;";
|
||||||
@ -3697,7 +3697,7 @@ function reporting_get_last_activity() {
|
|||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
// Show last activity from this user
|
// Show last activity from this user
|
||||||
|
$table = new stdClass();
|
||||||
$table->width = '100%';
|
$table->width = '100%';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
$table->size = array ();
|
$table->size = array ();
|
||||||
@ -4010,8 +4010,10 @@ function reporting_get_event_histogram_meta ($width) {
|
|||||||
$events = db_get_all_rows_sql($sql);
|
$events = db_get_all_rows_sql($sql);
|
||||||
|
|
||||||
$events_criticity = array();
|
$events_criticity = array();
|
||||||
foreach ($events as $key => $value) {
|
if(is_array($events)){
|
||||||
array_push($events_criticity,$value['criticity']);
|
foreach ($events as $key => $value) {
|
||||||
|
array_push($events_criticity,$value['criticity']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($events)) {
|
if (!empty($events)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user