summaryrefslogtreecommitdiffstats
path: root/frontends/php/include
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-13 13:36:05 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-11-13 13:36:05 +0000
commitb7e6ea8fc716f07c7ab98e08a730c3db16ab97a4 (patch)
tree4e2357096f9b7e844f559463f9d88d8f6324be5a /frontends/php/include
parentb2f4127653d868e987df2140b9ad992bcdd558d3 (diff)
downloadzabbix-b7e6ea8fc716f07c7ab98e08a730c3db16ab97a4.tar.gz
zabbix-b7e6ea8fc716f07c7ab98e08a730c3db16ab97a4.tar.xz
zabbix-b7e6ea8fc716f07c7ab98e08a730c3db16ab97a4.zip
- [NTT-46] TR-060 Can not get result of command execution
[svn merge -r5000:5003 svn://svn.zabbix.com/branches/1.4.j] git-svn-id: svn://svn.zabbix.com/trunk@5005 97f52cf1-0a1b-0410-bd0e-c28be96e8082
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;
}