diff options
author | Dmitry <dmitry@dhtmlx.com> | 2012-05-29 16:19:52 +0200 |
---|---|---|
committer | Dmitry <dmitry@dhtmlx.com> | 2012-05-29 19:09:30 +0200 |
commit | dbd9cce99a5e500658b58bb996fd396d8829e860 (patch) | |
tree | 3fb5b4714378b60e2cc55f6be478ef962321b36c | |
parent | f412231c95a2d54a1061b597b4032227e5e0bdb5 (diff) | |
download | connector-php-dbd9cce99a5e500658b58bb996fd396d8829e860.zip connector-php-dbd9cce99a5e500658b58bb996fd396d8829e860.tar.gz connector-php-dbd9cce99a5e500658b58bb996fd396d8829e860.tar.bz2 |
fix userdata for JSONDataConnector
-rw-r--r-- | codebase/data_connector.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/codebase/data_connector.php b/codebase/data_connector.php index f094fb8..b77d06b 100644 --- a/codebase/data_connector.php +++ b/codebase/data_connector.php @@ -258,7 +258,9 @@ class JSONCommonDataItem extends DataItem{ function to_xml(){ if ($this->skip) return ""; - $data = array(); + $data = array( + 'id' => $this->get_id() + ); for ($i=0; $i<sizeof($this->config->text); $i++){ $extra = $this->config->text[$i]["name"]; $data[$extra]=$this->data[$extra]; @@ -266,7 +268,7 @@ class JSONCommonDataItem extends DataItem{ if ($this->userdata !== false) foreach ($this->userdata as $key => $value) - $data["key"]=$value; + $data[$key]=$value; return json_encode($data); } @@ -426,7 +428,7 @@ class JSONTreeCommonDataItem extends TreeCommonDataItem{ if ($this->userdata !== false) foreach ($this->userdata as $key => $value) - $data["key"]=$value; + $data[$key]=$value; if ($this->kids === true) $data["dhx_kids"] = 1; |