2011-07-27 Sergio Martin <sergio.matin@artica.es>

* include/functions_html.php
	godmode/reporting/reporting_builder.php
	godmode/reporting/reporting_builder.item_editor.php: Fixed several
	warnings of undeclared variables and use of not supported parameter
	of function strstr in php 3.2



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4630 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2011-07-27 10:04:55 +00:00
parent fe0f580fa8
commit c87fc9a807
4 changed files with 48 additions and 34 deletions

View File

@ -1,3 +1,11 @@
2011-07-27 Sergio Martin <sergio.matin@artica.es>
* include/functions_html.php
godmode/reporting/reporting_builder.php
godmode/reporting/reporting_builder.item_editor.php: Fixed several
warnings of undeclared variables and use of not supported parameter
of function strstr in php 3.2
2011-07-27 Vanessa Gil <vanessa.gil@artica.es>
* operation/agentes/status_monitor.php: Update the monitor search with "Filter" button.

View File

@ -33,43 +33,44 @@ if (enterprise_include_once ('include/functions_metaconsole.php')) {
$servers = enterprise_hook("metaconsole_get_connection_names");
}
$idAgent = null;
$idCustomGraph = null;
$text = null;
$header = null;
$idCustom = null;
$url = null;
$field = null;
$line = null;
$group = 0;
$group_by_agent = 0;
$order_uptodown = 0;
$show_resume = 0;
$top_n = 0;
$top_n_value = 10;
$exception_condition = 0;
$exception_condition_value = 10;
$modulegroup = 0;
$period = 86400;
$only_display_wrong = 0;
$monday = true;
$tuesday = true;
$wednesday = true;
$thursday = true;
$friday = true;
$saturday = true;
$sunday = true;
$time_from = '00:00';
$time_to = '23:59';
$show_graph = 0;
switch ($action) {
case 'new':
$actionParameter = 'save';
$type = get_parameter('type', 'SLA');
$period = 86400;
$idAgent = null;
$idCustomGraph = null;
$text = null;
$header = null;
$idCustom = null;
$url = null;
$field = null;
$line = null;
$description = null;
$sql = null;
$group = 0;
$only_display_wrong = 0;
$monday = true;
$tuesday = true;
$wednesday = true;
$thursday = true;
$friday = true;
$saturday = true;
$sunday = true;
$time_from = '00:00';
$time_to = '23:59';
$group_by_agent = 0;
$order_uptodown = 0;
$show_resume = 0;
$top_n = 0;
$top_n_value = 10;
$exception_condition = 0;
$exception_condition_value = 10;
$show_graph = 0;
$show_in_two_columns = 0;
$show_in_landscape = 0;
$modulegroup = 0;
$server_name = '';
break;
default:

View File

@ -155,7 +155,13 @@ switch ($action) {
$resultOperationDB = (bool)db_process_sql_update('treport', array('name' => $reportName, 'id_group' => $idGroupReport, 'description' => $description), array('id_report' => $idReport));
}
else if ($action == 'save') {
$idOrResult = db_process_sql_insert('treport', array('name' => $reportName, 'id_group' => $idGroupReport, 'description' => $description));
if($reportName != "" && $idGroupReport != "") {
$idOrResult = db_process_sql_insert('treport', array('name' => $reportName, 'id_group' => $idGroupReport, 'description' => $description));
}
else {
$idOrResult = false;
}
if ($idOrResult === false) {
$resultOperationDB = false;
}
@ -213,7 +219,7 @@ switch ($action) {
break;
}
$id_gs = strstr($values ['id_gs'], '|', true);
$id_gs = substr ($values['id_gs'], 0, strpos ($values['id_gs'], '|'));
if ($id_gs !== false) {
$server_name = strstr($values ['id_gs'], '|');
$values ['id_gs'] = $id_gs;
@ -305,8 +311,7 @@ switch ($action) {
$resultOperationDB = false;
break;
}
$id_gs = strstr($values ['id_gs'], '|', true);
$id_gs = substr ($values['id_gs'], 0, strpos ($values['id_gs'], '|'));
if ($id_gs !== false) {
$server_name = strstr($values ['id_gs'], '|');
$values ['id_gs'] = $id_gs;

View File

@ -299,7 +299,7 @@ function html_print_select ($fields, $name, $selected = '', $script = '', $nothi
$output .= '>'.$nothing.'</option>';
}
if (!empty ($fields)) {
if (is_array($fields) && !empty ($fields)) {
if ($sort !== false) {
asort ($fields);
}