mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed error, when type modules is Asyncronous type, tiquet: #2193
(cherry picked from commit 7efff2181640af397efb5f0f2c6eb41a7906b938)
This commit is contained in:
parent
f51a36fd3d
commit
c8d152c9cf
@ -130,7 +130,7 @@ function mainModuleGroups() {
|
|||||||
//The big query
|
//The big query
|
||||||
switch ($config["dbtype"]) {
|
switch ($config["dbtype"]) {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
$sql = "SELECT COUNT(id_agente) AS count, case utimestamp when 0 then 5 else estado end as estado
|
$sql = "SELECT COUNT(id_agente) AS count, estado
|
||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
WHERE id_agente IN
|
WHERE id_agente IN
|
||||||
(SELECT id_agente FROM tagente WHERE id_grupo = %d AND disabled IS FALSE)
|
(SELECT id_agente FROM tagente WHERE id_grupo = %d AND disabled IS FALSE)
|
||||||
@ -141,8 +141,7 @@ function mainModuleGroups() {
|
|||||||
GROUP BY estado";
|
GROUP BY estado";
|
||||||
break;
|
break;
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
$sql = "SELECT COUNT(id_agente) AS count,
|
$sql = "SELECT COUNT(id_agente) AS count, estado
|
||||||
case utimestamp when 0 then 5 else estado end as estado
|
|
||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
WHERE id_agente IN
|
WHERE id_agente IN
|
||||||
(SELECT id_agente FROM tagente WHERE id_grupo = %d AND disabled = 0)
|
(SELECT id_agente FROM tagente WHERE id_grupo = %d AND disabled = 0)
|
||||||
@ -153,7 +152,7 @@ function mainModuleGroups() {
|
|||||||
GROUP BY estado, utimestamp";
|
GROUP BY estado, utimestamp";
|
||||||
break;
|
break;
|
||||||
case "oracle":
|
case "oracle":
|
||||||
$sql = "SELECT COUNT(id_agente) AS count, case when utimestamp = 0 then 5 else estado end estado
|
$sql = "SELECT COUNT(id_agente) AS count, estado
|
||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
WHERE id_agente IN
|
WHERE id_agente IN
|
||||||
(SELECT id_agente FROM tagente WHERE id_grupo = %d AND (disabled IS NOT NULL AND disabled <> 0))
|
(SELECT id_agente FROM tagente WHERE id_grupo = %d AND (disabled IS NOT NULL AND disabled <> 0))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user