summaryrefslogtreecommitdiffstats
path: root/frontends
diff options
context:
space:
mode:
Diffstat (limited to 'frontends')
-rw-r--r--frontends/php/include/config.inc.php2
-rw-r--r--frontends/php/include/copt.lib.php6
-rw-r--r--frontends/php/include/hosts.inc.php15
-rw-r--r--frontends/php/include/triggers.inc.php3
4 files changed, 17 insertions, 9 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php
index bd455765..4fc628c9 100644
--- a/frontends/php/include/config.inc.php
+++ b/frontends/php/include/config.inc.php
@@ -1139,7 +1139,7 @@ function SDI($msg="SDI") { echo "DEBUG INFO: $msg ".BR; } // DEBUG INFO!!!
{
global $page;
global $USER_DETAILS;
-COpt::profiling_start("page");
+//COpt::profiling_start("page");
if($noauth==0)
{
diff --git a/frontends/php/include/copt.lib.php b/frontends/php/include/copt.lib.php
index c3fe8a60..ce1b3b05 100644
--- a/frontends/php/include/copt.lib.php
+++ b/frontends/php/include/copt.lib.php
@@ -86,7 +86,7 @@
** Eugene Grigorjev (eugene.grigorjev@zabbix.com)
**/
- //define("USE_PROFILING",1);
+ define("USE_PROFILING",1);
if(defined('USE_PROFILING'))
{
@@ -115,9 +115,11 @@ if(defined('USE_PROFILING'))
$endtime = COpt::getmicrotime();
if(is_null($type)) $type="global";
- echo "<br/>\nTime to execute (".$type."): ". bcsub($endtime,$starttime[$type],6)." seconds!\n<br/>";
+// echo "<br/>\nTime to execute (".$type."): ". bcsub($endtime,$starttime[$type],6)." seconds!\n<br/>";
+ echo "<br/>\nTime to execute (".$type."): ".($endtime-$starttime[$type])." seconds!\n<br/>";
}
}
+ COpt::profiling_start("page");
}
else
{
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php
index 00e9eb95..07e1c686 100644
--- a/frontends/php/include/hosts.inc.php
+++ b/frontends/php/include/hosts.inc.php
@@ -478,8 +478,11 @@
if($groupid > 0)
{
- if(DBnum_rows(DBselect("select hg.hostid from hosts_groups hg".
- " where hg.groupid=".$groupid." and hg.hostid=".$hostid)) != 1)
+// if(DBnum_rows(DBselect("select hg.hostid from hosts_groups hg".
+// " where hg.groupid=".$groupid." and hg.hostid=".$hostid)) != 1)
+// $hostid = 0;
+ if(!DBfetch(DBselect("select hg.hostid from hosts_groups hg".
+ " where hg.groupid=".$groupid." and hg.hostid=".$hostid)))
$hostid = 0;
}
@@ -487,9 +490,13 @@
if($hostid > 0)
{
- if(DBnum_rows(DBselect("select distinct h.hostid from hosts h".$item_table.
+// if(DBnum_rows(DBselect("select distinct h.hostid from hosts h".$item_table.
+// " where h.status<>".HOST_STATUS_DELETED.$with_host_status.$with_items.
+// " and h.hostid=".$hostid)) != 1)
+// $hostid = 0;
+ if(!DBfetch(DBselect("select distinct h.hostid from hosts h".$item_table.
" where h.status<>".HOST_STATUS_DELETED.$with_host_status.$with_items.
- " and h.hostid=".$hostid)) != 1)
+ " and h.hostid=".$hostid)))
$hostid = 0;
}
diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php
index ec7e7873..fc0c6539 100644
--- a/frontends/php/include/triggers.inc.php
+++ b/frontends/php/include/triggers.inc.php
@@ -1033,8 +1033,7 @@
$db_triggers = DBselect("select distinct t.description from hosts h,items i,triggers t,functions f $group_where".
" h.status=".HOST_STATUS_MONITORED." and h.hostid=i.hostid and i.itemid=f.itemid and f.triggerid=t.triggerid".
- " and t.status=".TRIGGER_STATUS_ENABLED.
- " group by 1");
+ " and t.status=".TRIGGER_STATUS_ENABLED);
while($triggers = DBfetch($db_triggers))
{
$table_row = array(nbsp($triggers["description"]));