mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Fixed problems when filter by text in incidents and charge firts task of incidents.
This commit is contained in:
parent
819ad1da54
commit
27e5bfc43d
@ -190,6 +190,9 @@ switch ($config["dbtype"]) {
|
|||||||
$count_sql = "SELECT count(*) FROM tincidencia WHERE
|
$count_sql = "SELECT count(*) FROM tincidencia WHERE
|
||||||
id_grupo IN (".implode (",",array_keys ($groups)).")".$filter."
|
id_grupo IN (".implode (",",array_keys ($groups)).")".$filter."
|
||||||
ORDER BY actualizacion DESC";
|
ORDER BY actualizacion DESC";
|
||||||
|
$total_sql = "SELECT count(*) FROM tincidencia WHERE
|
||||||
|
id_grupo IN (".implode (",",array_keys ($groups)).")
|
||||||
|
ORDER BY actualizacion DESC";
|
||||||
break;
|
break;
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
case "oracle":
|
case "oracle":
|
||||||
@ -198,17 +201,20 @@ switch ($config["dbtype"]) {
|
|||||||
ORDER BY actualizacion DESC OFFSET ".$offset." LIMIT ".$config["block_size"];
|
ORDER BY actualizacion DESC OFFSET ".$offset." LIMIT ".$config["block_size"];
|
||||||
$count_sql = "SELECT count(*) FROM tincidencia WHERE
|
$count_sql = "SELECT count(*) FROM tincidencia WHERE
|
||||||
id_grupo IN (".implode (",",array_keys ($groups)).")".$filter;
|
id_grupo IN (".implode (",",array_keys ($groups)).")".$filter;
|
||||||
|
$total_sql = "SELECT count(*) FROM tincidencia WHERE
|
||||||
|
id_grupo IN (".implode (",",array_keys ($groups)).")";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = db_get_all_rows_sql ($sql);
|
$result = db_get_all_rows_sql ($sql);
|
||||||
$count = db_get_value_sql ($count_sql);
|
$count = db_get_value_sql ($count_sql);
|
||||||
|
$count_total = db_get_value_sql ($total_sql);
|
||||||
|
|
||||||
if (empty ($result)) {
|
if (empty ($result)) {
|
||||||
$result = array ();
|
$result = array ();
|
||||||
$count = 0;
|
$count = 0;
|
||||||
}
|
}
|
||||||
if ($count >= 1) {
|
if ($count_total >= 1) {
|
||||||
echo '<form name="visualizacion" method="post" action="index.php?sec=workspace&sec2=operation/incidents/incident">';
|
echo '<form name="visualizacion" method="post" action="index.php?sec=workspace&sec2=operation/incidents/incident">';
|
||||||
|
|
||||||
echo '<table class="databox filters" cellpadding="4" cellspacing="4" width="100%"><tr>
|
echo '<table class="databox filters" cellpadding="4" cellspacing="4" width="100%"><tr>
|
||||||
@ -281,7 +287,7 @@ if ($count >= 1) {
|
|||||||
echo '</form>';
|
echo '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($count < 1) {
|
if ($count_total < 1) {
|
||||||
require_once ($config['homedir'] . "/general/firts_task/incidents.php");
|
require_once ($config['homedir'] . "/general/firts_task/incidents.php");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user