From 27e5bfc43d9da32a6a8376353ca81fa4ae86dad8 Mon Sep 17 00:00:00 2001 From: m-lopez-f Date: Tue, 18 Aug 2015 16:23:45 +0200 Subject: [PATCH] Fixed problems when filter by text in incidents and charge firts task of incidents. --- pandora_console/operation/incidents/incident.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pandora_console/operation/incidents/incident.php b/pandora_console/operation/incidents/incident.php index 2be9c18936..7064b15bbe 100755 --- a/pandora_console/operation/incidents/incident.php +++ b/pandora_console/operation/incidents/incident.php @@ -190,6 +190,9 @@ switch ($config["dbtype"]) { $count_sql = "SELECT count(*) FROM tincidencia WHERE id_grupo IN (".implode (",",array_keys ($groups)).")".$filter." ORDER BY actualizacion DESC"; + $total_sql = "SELECT count(*) FROM tincidencia WHERE + id_grupo IN (".implode (",",array_keys ($groups)).") + ORDER BY actualizacion DESC"; break; case "postgresql": case "oracle": @@ -198,17 +201,20 @@ switch ($config["dbtype"]) { ORDER BY actualizacion DESC OFFSET ".$offset." LIMIT ".$config["block_size"]; $count_sql = "SELECT count(*) FROM tincidencia WHERE id_grupo IN (".implode (",",array_keys ($groups)).")".$filter; + $total_sql = "SELECT count(*) FROM tincidencia WHERE + id_grupo IN (".implode (",",array_keys ($groups)).")"; break; } $result = db_get_all_rows_sql ($sql); $count = db_get_value_sql ($count_sql); +$count_total = db_get_value_sql ($total_sql); if (empty ($result)) { $result = array (); $count = 0; } -if ($count >= 1) { +if ($count_total >= 1) { echo '
'; echo ' @@ -281,7 +287,7 @@ if ($count >= 1) { echo ''; } -if ($count < 1) { +if ($count_total < 1) { require_once ($config['homedir'] . "/general/firts_task/incidents.php"); } else {