2013-05-16 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_networkmap.php, include/functions_reporting.php, include/functions_users.php: cleaned source code style. * operation/search_agents.getdata.php: fixed notice messages PHP. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8142 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0fd149893e
commit
c999a888b9
|
@ -1,3 +1,10 @@
|
|||
2013-05-16 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_networkmap.php, include/functions_reporting.php,
|
||||
include/functions_users.php: cleaned source code style.
|
||||
|
||||
* operation/search_agents.getdata.php: fixed notice messages PHP.
|
||||
|
||||
2013-05-16 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_incidents.php, include/api.php,
|
||||
|
|
|
@ -919,7 +919,7 @@ function networkmap_get_networkmap ($id_networkmap, $filter = false, $fields = f
|
|||
|
||||
$filter['id_networkmap'] = $id_networkmap;
|
||||
|
||||
if($check_user) {
|
||||
if ($check_user) {
|
||||
//If hte user has admin flag don't filter by user
|
||||
$user_info = users_get_user_by_id($config['id_user']);
|
||||
|
||||
|
@ -945,12 +945,12 @@ function networkmap_get_networkmap ($id_networkmap, $filter = false, $fields = f
|
|||
function networkmap_get_networkmaps ($id_user = '', $type = '', $optgrouped = true) {
|
||||
global $config;
|
||||
|
||||
if($id_user == '') {
|
||||
if ($id_user == '') {
|
||||
$id_user = $config['id_user'];
|
||||
}
|
||||
|
||||
$type_cond = '';
|
||||
if($type != '') {
|
||||
if ($type != '') {
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$type_cond = ' AND type = "'.$type.'"';
|
||||
|
@ -972,13 +972,13 @@ function networkmap_get_networkmaps ($id_user = '', $type = '', $optgrouped = tr
|
|||
break;
|
||||
}
|
||||
|
||||
if($networkmaps_raw === false){
|
||||
if ($networkmaps_raw === false){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$networkmaps = array();
|
||||
foreach($networkmaps_raw as $key => $networkmapitem) {
|
||||
if($optgrouped) {
|
||||
foreach ($networkmaps_raw as $key => $networkmapitem) {
|
||||
if ($optgrouped) {
|
||||
$networkmaps[$networkmapitem['id_networkmap']] =
|
||||
array('name' => $networkmapitem['name'],
|
||||
'optgroup' => $networkmapitem['type']);
|
||||
|
@ -1071,13 +1071,13 @@ function networkmap_get_filter_types () {
|
|||
|
||||
?>
|
||||
<script language="javascript" type="text/javascript">
|
||||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
$("area[title!='<?php echo 'Pandora FMS'; ?>']").cluetip ({
|
||||
arrows: true,
|
||||
attribute: 'title',
|
||||
cluetipClass: 'default'
|
||||
/* <![CDATA[ */
|
||||
$(document).ready (function () {
|
||||
$("area[title!='<?php echo 'Pandora FMS'; ?>']").cluetip ({
|
||||
arrows: true,
|
||||
attribute: 'title',
|
||||
cluetipClass: 'default'
|
||||
});
|
||||
});
|
||||
});
|
||||
/* ]]> */
|
||||
/* ]]> */
|
||||
</script>
|
||||
|
|
|
@ -1448,7 +1448,7 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
|
|||
|
||||
// Add id of this group to create the clause
|
||||
// If the group is quering previously, we ingore it
|
||||
if(!in_array($group,$covered_groups)){
|
||||
if (!in_array($group,$covered_groups)){
|
||||
array_push($covered_groups, $group);
|
||||
array_push($group_array, $group);
|
||||
}
|
||||
|
@ -1475,7 +1475,7 @@ function reporting_get_group_stats ($id_group = 0, $access = 'AR') {
|
|||
}
|
||||
*/
|
||||
|
||||
if(!empty($group_array)) {
|
||||
if (!empty($group_array)) {
|
||||
// Get unknown agents by using the status code in modules
|
||||
$data["agents_unknown"] += groups_agent_unknown ($group_array);
|
||||
|
||||
|
@ -5776,7 +5776,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
|||
$data = array ();
|
||||
$table->colspan[1][0] = 2;
|
||||
$table->colspan[2][0] = 2;
|
||||
if($description != '') {
|
||||
if ($description != '') {
|
||||
$data[0] = $description;
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,8 @@ function users_get_info ($order = "fullname", $info = "fullname") {
|
|||
* @return int sucess return
|
||||
*/
|
||||
function users_disable ($user_id, $new_disabled_value) {
|
||||
return db_process_sql_update('tusuario', array('disabled' => $new_disabled_value), array('id_user' => $user_id));
|
||||
return db_process_sql_update('tusuario',
|
||||
array('disabled' => $new_disabled_value), array('id_user' => $user_id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -795,7 +796,7 @@ function users_check_users() {
|
|||
function users_can_manage_group_all($id_group = 0) {
|
||||
global $config;
|
||||
|
||||
if($id_group != 0) {
|
||||
if ($id_group != 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,8 @@ switch ($sortField) {
|
|||
break;
|
||||
}
|
||||
|
||||
$totalAgents = 0;
|
||||
|
||||
$agents = false;
|
||||
if ($searchAgents) {
|
||||
$userGroups = users_get_groups($config['id_user'], 'AR', false);
|
||||
|
|
Loading…
Reference in New Issue