summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include')
-rw-r--r--frontends/php/include/classes/cformtable.inc.php1
-rw-r--r--frontends/php/include/classes/ctag.inc.php2
-rw-r--r--frontends/php/include/scripts.inc.php20
3 files changed, 14 insertions, 9 deletions
diff --git a/frontends/php/include/classes/cformtable.inc.php b/frontends/php/include/classes/cformtable.inc.php
index 8c57865f..b704ab13 100644
--- a/frontends/php/include/classes/cformtable.inc.php
+++ b/frontends/php/include/classes/cformtable.inc.php
@@ -146,7 +146,6 @@
),
$class);
}
-
array_push($this->center_items, $item1);
}
diff --git a/frontends/php/include/classes/ctag.inc.php b/frontends/php/include/classes/ctag.inc.php
index c0924477..f8a93ea2 100644
--- a/frontends/php/include/classes/ctag.inc.php
+++ b/frontends/php/include/classes/ctag.inc.php
@@ -36,7 +36,7 @@
if(is_object($item))
{
- $res = $item->ToString();
+ $res = $item->ToString(false);
}
elseif(is_array($item))
{
diff --git a/frontends/php/include/scripts.inc.php b/frontends/php/include/scripts.inc.php
index 33f6f1c1..b87749cd 100644
--- a/frontends/php/include/scripts.inc.php
+++ b/frontends/php/include/scripts.inc.php
@@ -74,14 +74,19 @@ function execute_script($scriptid,$hostid){
if($res)
{
global $ZBX_LOCALNODEID;
-
$res = false;
-
- $sql = "SELECT ip,port FROM nodes WHERE nodeid=$ZBX_LOCALNODEID";
- $node = DBselect($sql);
- if($row = DBfetch($node))
+ if($nodeid == 0)
{
- $res = socket_connect($socket, $row['ip'], $row['port']);
+ $res = socket_connect($socket, '127.0.0.1', 10051);
+ }
+ else
+ {
+ $sql = "SELECT ip,port FROM nodes WHERE nodeid=$ZBX_LOCALNODEID";
+ $node = DBselect($sql);
+ if($row = DBfetch($node))
+ {
+ $res = socket_connect($socket, $row['ip'], $row['port']);
+ }
}
}
if($res)
@@ -101,7 +106,8 @@ function execute_script($scriptid,$hostid){
}
else
{
- $message = socket_strerror(socket_last_error());
+ $message["flag"]=-1;
+ $message["message"] = socket_strerror(socket_last_error());
}
return $message;
}