PDA

View Full Version : PATCH : query in Events


SLMitch
09-08-2006, 16:49
they are a little bug in /include/events.inc.php : hosts_groups jointure is forgotten in the SQL query.


--- events.inc.php-orig 2006-08-09 15:53:42.000000000 +0200
+++ events.inc.php 2006-08-09 15:54:53.000000000 +0200
@@ -28,7 +28,7 @@
}
elseif($groupid > 0)
{
- $sql="select distinct a.clock,a.value,a.triggerid from alarms a,functions f,items i where a.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=hg.hostid and hg.groupid=".$groupid." order by clock desc";
+ $sql="select distinct a.clock,a.value,a.triggerid from alarms a,functions f,items i,hosts_groups hg where a.triggerid=f.triggerid and f.itemid=i.itemid and i.hostid=hg.hostid and hg.groupid=".$groupid." order by clock desc";
}
else
{

James Wells
19-09-2006, 05:23
Greetings,

Was wondering why that was failing. I have added this to a patch I am building for submission to CVS for 1.1.3.

James Wells
21-09-2006, 18:45
This has now been submitted to CVS