diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 70a37016c2..30f5f14413 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-04-22 Miguel de Dios + + * operation/users/user_edit.php, include/functions_graph.php: + improved the source code style. + + * mobile/operation/agent.php, mobile/operation/modules.php: somes + fixes. + 2013-04-22 Mario Pulido * include/help/es/help_alerts.php, diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index a387b679c9..280eda28f0 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1371,9 +1371,9 @@ function graph_alert_status ($defined_alerts, $fired_alerts, $width = 300, $heig // If any value is negative, truncate it to 0 function truncate_negatives(&$element) { - if($element < 0) { - $element = 0; - } + if ($element < 0) { + $element = 0; + } } /** diff --git a/pandora_console/mobile/operation/agent.php b/pandora_console/mobile/operation/agent.php index b77bd1b536..a32128ff9b 100644 --- a/pandora_console/mobile/operation/agent.php +++ b/pandora_console/mobile/operation/agent.php @@ -136,7 +136,7 @@ class Agent { $modules = new Modules(); - $filters = array('id_agent' => $this->id, 'all_modules' => true); + $filters = array('id_agent' => $this->id, 'all_modules' => true, 'status' => -1); $modules->setFilters($filters); $modules->disabledColumns(array('agent')); $ui->contentBeginCollapsible(__('Modules')); diff --git a/pandora_console/mobile/operation/modules.php b/pandora_console/mobile/operation/modules.php index b600ff40a0..7586949881 100644 --- a/pandora_console/mobile/operation/modules.php +++ b/pandora_console/mobile/operation/modules.php @@ -85,6 +85,9 @@ class Modules { if (isset($filters['all_modules'])) { $this->all_modules = $filters['all_modules']; } + if (isset($filters['status'])) { + $this->status = $filters['status']; + } } public function disabledColumns($columns = null) { @@ -517,7 +520,9 @@ class Modules { $listModules = $this->getListModules($page); //$ui->debug($listModules, true); - + html_debug_print("-----------", true); + html_debug_print($listModules, true); + html_debug_print("===========", true); if ($listModules['total'] == 0) { $html = '

' . __('No modules') . '

'; if (!$return) { diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 2fb87f59d9..e1ae690ff5 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -74,7 +74,7 @@ if (is_ajax ()){ } // Header -if($meta) { +if ($meta) { user_meta_print_header(); $url = 'index.php?sec=advanced&sec2=advanced/users_setup&tab=user_edit'; } @@ -283,7 +283,7 @@ else $usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group)); $id_usr = $config['id_user']; -if(!$meta) { +if (!$meta) { $data = array(); $data[0] = __('Shortcut bar') . ui_print_help_tip(__('This will activate a shortcut bar with alerts, events, messages... information'), true); $data[1] = __('Home screen'). ui_print_help_tip(__('User can customize the home page. By default, will display \'Agent Detail\'. Example: Select \'Other\' and type sec=estado&sec2=operation/agentes/estado_agente to show agent detail view'), true);