Zabbix 1.5.4 - Build 5766
Error in SQL Statement in "triggers.inc.php". See Red.
Before:
After:
Error in SQL Statement in "triggers.inc.php". See Red.
Before:
Code:
806 /******************************************************************************
807 * *
808 * Comments: !!! Don't forget sync code with C !!! *
809 * *
810 ******************************************************************************/
811 function replace_template_dependencies($deps, $hostid){
812 foreach($deps as $id => $val){
813 if($db_new_dep = DBfetch(DBselect('[COLOR="DarkRed"]SEELCT[/COLOR] t.triggerid '.
814 ' FROM triggers t,functions f,items i '.
815 ' WHERE t.templateid='.$val.
816 ' AND f.triggerid=t.triggerid '.
817 ' AND f.itemid=i.itemid '.
818 ' AND i.hostid='.$hostid)))
819 {
820 $deps[$id] = $db_new_dep['triggerid'];
821 }
822 }
823 return $deps;
824 }
After:
Code:
806 /******************************************************************************
807 * *
808 * Comments: !!! Don't forget sync code with C !!! *
809 * *
810 ******************************************************************************/
811 function replace_template_dependencies($deps, $hostid){
812 foreach($deps as $id => $val){
813 if($db_new_dep = DBfetch(DBselect('[COLOR="DarkRed"]SELECT[/COLOR] t.triggerid '.
814 ' FROM triggers t,functions f,items i '.
815 ' WHERE t.templateid='.$val.
816 ' AND f.triggerid=t.triggerid '.
817 ' AND f.itemid=i.itemid '.
818 ' AND i.hostid='.$hostid)))
819 {
820 $deps[$id] = $db_new_dep['triggerid'];
821 }
822 }
823 return $deps;
824 }
Comment