From 89d7e883bd2109ad8ff022d7a049a04f30e20d55 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 25 Apr 2013 16:32:18 +0000 Subject: [PATCH] 2013-04-25 Miguel de Dios * godmode/modules/manage_network_components_form.php, godmode/servers/plugin.php, operation/search_users.getdata.php, operation/visual_console/render_view.php, operation/events/events_marquee.php, operation/events/events_list.php, operation/snmpconsole/snmp_view.php, operation/gis_maps/render_view.php, operation/integria_incidents/incident.files.php, operation/integria_incidents/incident.tracking.php, operation/integria_incidents/incident.list.php: fixed the old refr access for the config instead the get var. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8061 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- .../modules/manage_network_components_form.php | 2 +- pandora_console/godmode/servers/plugin.php | 8 ++++---- pandora_console/operation/events/events_list.php | 2 +- pandora_console/operation/events/events_marquee.php | 2 +- pandora_console/operation/gis_maps/render_view.php | 4 ++-- .../operation/integria_incidents/incident.files.php | 2 +- .../operation/integria_incidents/incident.list.php | 2 +- .../integria_incidents/incident.tracking.php | 4 ++-- pandora_console/operation/search_users.getdata.php | 4 ++-- pandora_console/operation/snmpconsole/snmp_view.php | 4 ++-- .../operation/visual_console/render_view.php | 12 ++++++------ 11 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pandora_console/godmode/modules/manage_network_components_form.php b/pandora_console/godmode/modules/manage_network_components_form.php index fcf917311b..bddfcb421d 100644 --- a/pandora_console/godmode/modules/manage_network_components_form.php +++ b/pandora_console/godmode/modules/manage_network_components_form.php @@ -422,7 +422,7 @@ $(document).ready (function () { $(this).attr('selected','selected'); }); }); - if ($("#snmp_version").value == "3"){ + if ($("#snmp_version").value == "3") { $("input[name=snmp3_auth_user]").css({backgroundColor: '#fff'}); $("input[name=snmp3_auth_user]").removeAttr('disabled'); diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 9c9b2604e7..15ecdc2d26 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -275,7 +275,7 @@ if (($create != "") OR ($view != "")) { echo ''; echo ''; echo ''; diff --git a/pandora_console/operation/integria_incidents/incident.tracking.php b/pandora_console/operation/integria_incidents/incident.tracking.php index 336fb3e17d..c94791bdc1 100644 --- a/pandora_console/operation/integria_incidents/incident.tracking.php +++ b/pandora_console/operation/integria_incidents/incident.tracking.php @@ -24,7 +24,7 @@ $table->head[2] = __('Date'); $table->data = array(); -if(isset($result['tracking'][0]) && is_array($result['tracking'][0])){ +if (isset($result['tracking'][0]) && is_array($result['tracking'][0])) { $tracking = $result['tracking']; } else { @@ -32,7 +32,7 @@ else { } $row = 0; -foreach($tracking as $value) { +foreach ($tracking as $value) { $table->data[$row][0] = $value['description']; $table->data[$row][1] = $value['id_user']; diff --git a/pandora_console/operation/search_users.getdata.php b/pandora_console/operation/search_users.getdata.php index 0c12aaf14a..e5dd296e73 100644 --- a/pandora_console/operation/search_users.getdata.php +++ b/pandora_console/operation/search_users.getdata.php @@ -146,11 +146,11 @@ if ($searchUsers) { } } - if($only_count) { + if ($only_count) { unset($users); } - if(!$users_id) { + if (!$users_id) { $user_condition = ""; } else { diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index d68a8b4b78..7d238d40d9 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -354,7 +354,7 @@ $table->data[4][1] = ''.__('Type').'' . ui_print_help_tip(__('S $trap_types = array(-1 => __('None'), 0 => __('Cold start (0)'), 1 => __('Warm start (1)'), 2 => __('Link down (2)'), 3 => __('Link up (3)'), 4 => __('Authentication failure (4)'), 5 => __('Other')); $table->data[4][2] = html_print_select ($trap_types, 'trap_type', $trap_type, 'this.form.submit();', '', '', true, false, false); -$filter = ''; +$filter = ''; $filter .= html_print_table($table, true); $filter .= '
'; $filter .= html_print_submit_button(__('Update'), 'search', false, 'class="sub upd"', true); @@ -371,7 +371,7 @@ $trapcount = db_get_sql ("SELECT COUNT(id_trap) FROM ttrap " . $whereSubquery); $urlPagination = "index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&filter_agent=" . $filter_agent . "&filter_oid=" . $filter_oid . "&filter_severity=" . $filter_severity . "&filter_fired=" . $filter_fired . "&filter_status=" . $filter_status - . "&search_string=" . $search_string . "&pagination=".$pagination."&offset=".$offset."&refr=".$config["refr"]."&pure=".$config["pure"]; + . "&search_string=" . $search_string . "&pagination=".$pagination."&offset=".$offset."&refr=".((int)get_parameter('refr', 0))."&pure=".$config["pure"]; ui_pagination ($trapcount, $urlPagination, $offset, $pagination); echo ''; diff --git a/pandora_console/operation/visual_console/render_view.php b/pandora_console/operation/visual_console/render_view.php index 708e420215..a6e7a5743f 100644 --- a/pandora_console/operation/visual_console/render_view.php +++ b/pandora_console/operation/visual_console/render_view.php @@ -106,11 +106,11 @@ $options['view']['active'] = true; if (!defined('METACONSOLE')) { if ($config["pure"] == 0) { - $options['pure']['text'] = '' . html_print_image ("images/full_screen.png", true, array ("title" => __('Full screen mode'))) + $options['pure']['text'] = '' . html_print_image ("images/full_screen.png", true, array ("title" => __('Full screen mode'))) . ""; } else { - $options['pure']['text'] = '' + $options['pure']['text'] = '' . html_print_image ("images/normal_screen.png", true, array ("title" => __('Back to normal mode'))) . ""; @@ -161,7 +161,7 @@ if ($vc_refr) { echo '
 
'; -if ($config['pure'] && $config["refr"] != 0) { +if ($config['pure'] && ((int)get_parameter('refr', 0)) != 0) { echo '

'; } @@ -180,7 +180,7 @@ else html_print_table ($table); echo ''; -if ($config["pure"] && $config["refr"] != 0) { +if ($config["pure"] && ((int)get_parameter('refr', 0)) != 0) { ui_require_jquery_file ('countdown'); ui_require_css_file ('countdown'); } @@ -195,10 +195,10 @@ $(document).ready (function () { }); 0) { + if ($config["pure"] && ((int)get_parameter('refr', 0)) > 0) { ?> t = new Date(); - t.setTime (t.getTime() + ); + t.setTime (t.getTime() + ); $("#countdown").countdown({ until: t, format: 'MS',
'; - if ($create != ""){ + if ($create != "") { echo ""; } @@ -295,7 +295,7 @@ else { } // Update plugin - if (isset($_GET["update_plugin"])){ // if modified any parameter + if (isset($_GET["update_plugin"])) { // if modified any parameter $plugin_id = get_parameter ("update_plugin", 0); $plugin_name = get_parameter ("form_name", ""); $plugin_description = get_parameter ("form_description", ""); @@ -308,7 +308,7 @@ else { // Get macros $i = 1; $macros = array(); - while(1) { + while (1) { $macro = (string)get_parameter ('field'.$i.'_macro'); if($macro == '') { break; @@ -350,7 +350,7 @@ else { } // Create plugin - if (isset($_GET["create_plugin"])){ + if (isset($_GET["create_plugin"])) { $plugin_name = get_parameter ("form_name", ""); $plugin_description = get_parameter ("form_description", ""); $plugin_max_timeout = get_parameter ("form_max_timeout", ""); diff --git a/pandora_console/operation/events/events_list.php b/pandora_console/operation/events/events_list.php index cab7df213f..17501133b3 100644 --- a/pandora_console/operation/events/events_list.php +++ b/pandora_console/operation/events/events_list.php @@ -718,7 +718,7 @@ $(document).ready( function() { jQuery.each (data, function (i, val) { s = js_html_entity_decode(val); - if (i == id_filter_save){ + if (i == id_filter_save) { $('#filter_id').append ($('').html (s).attr ("value", i)); } else { diff --git a/pandora_console/operation/events/events_marquee.php b/pandora_console/operation/events/events_marquee.php index 3f638ae10e..0632c374e1 100644 --- a/pandora_console/operation/events/events_marquee.php +++ b/pandora_console/operation/events/events_marquee.php @@ -89,7 +89,7 @@ switch ($config["dbtype"]) { $result = db_get_all_rows_sql ($sql); foreach ($result as $row) { $agente = ""; - if ($row["id_agente"] != 0){ + if ($row["id_agente"] != 0) { $agente = db_get_sql ("SELECT nombre FROM tagente WHERE id_agente = ". $row["id_agente"]); diff --git a/pandora_console/operation/gis_maps/render_view.php b/pandora_console/operation/gis_maps/render_view.php index baaa72737d..50f9c15826 100644 --- a/pandora_console/operation/gis_maps/render_view.php +++ b/pandora_console/operation/gis_maps/render_view.php @@ -87,11 +87,11 @@ $layers = gis_get_layers($idMap); $buttons = array(); if ($config["pure"] == 0) { - $buttons[]['text'] = '' . + $buttons[]['text'] = '' . html_print_image ("images/full_screen.png", true, array ("title" => __('Full screen mode'))) . ""; } else { - $buttons[]['text'] = '' . + $buttons[]['text'] = '' . html_print_image ("images/normalscreen.png", true, array ("title" => __('Back to normal mode'))) . ""; } diff --git a/pandora_console/operation/integria_incidents/incident.files.php b/pandora_console/operation/integria_incidents/incident.files.php index 9990dd4944..dd1cf7f4a2 100644 --- a/pandora_console/operation/integria_incidents/incident.files.php +++ b/pandora_console/operation/integria_incidents/incident.files.php @@ -47,7 +47,7 @@ $table->head[4] = __('Delete'); $table->data = array(); -if(isset($result['file'][0]) && is_array($result['file'][0])){ +if (isset($result['file'][0]) && is_array($result['file'][0])) { $files = $result['file']; } else { diff --git a/pandora_console/operation/integria_incidents/incident.list.php b/pandora_console/operation/integria_incidents/incident.list.php index ca12566440..2d4b29c3da 100644 --- a/pandora_console/operation/integria_incidents/incident.list.php +++ b/pandora_console/operation/integria_incidents/incident.list.php @@ -68,7 +68,7 @@ echo ''; html_print_select ($status, 'search_status', $search_status, '', '', 0, false); echo ''; -if (isset($groups)){ +if (isset($groups)) { html_print_select ($groups, 'search_group', $search_group, '', '', 0, false, false, false); } echo '