diff options
author | Stanislau Wolski <stanislau.wolski@gmail.com> | 2014-01-16 14:53:07 +0300 |
---|---|---|
committer | Stanislau Wolski <stanislau.wolski@gmail.com> | 2014-01-16 14:53:07 +0300 |
commit | 6538216e5a5616b6b2cd48508a88047d1b3fe485 (patch) | |
tree | 5829c7808d5e7b55dde175094fb35b4fc6c622f4 /codebase | |
parent | 751824d9a83915ab1cf71ef478ac2dbb25105ac4 (diff) | |
parent | e8adb5a9ce248e67c523fac807f9ee1bc33bcb7d (diff) | |
download | connector-php-6538216e5a5616b6b2cd48508a88047d1b3fe485.zip connector-php-6538216e5a5616b6b2cd48508a88047d1b3fe485.tar.gz connector-php-6538216e5a5616b6b2cd48508a88047d1b3fe485.tar.bz2 |
Merge branch 'master' of 192.168.3.251:connector-php
Diffstat (limited to 'codebase')
-rw-r--r-- | codebase/data_connector.php | 4 | ||||
-rw-r--r-- | codebase/strategy.php | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/codebase/data_connector.php b/codebase/data_connector.php index d3e5492..deaf7d8 100644 --- a/codebase/data_connector.php +++ b/codebase/data_connector.php @@ -269,7 +269,7 @@ class JSONCommonDataItem extends DataItem{ /*! return self as XML string */ function to_xml(){ - if ($this->skip) return ""; + if ($this->skip) return false; $data = array( 'id' => $this->get_id() @@ -493,7 +493,7 @@ class JSONTreeCommonDataItem extends TreeCommonDataItem{ /*! return self as XML string */ function to_xml_start(){ - if ($this->skip) return ""; + if ($this->skip) return false; $data = array( "id" => $this->get_id() ); for ($i=0; $i<sizeof($this->config->text); $i++){ diff --git a/codebase/strategy.php b/codebase/strategy.php index dfb69f6..f9a106f 100644 --- a/codebase/strategy.php +++ b/codebase/strategy.php @@ -130,7 +130,9 @@ class JSONRenderStrategy extends RenderStrategy { if ($data->get_id()===false) $data->set_id($conn->uuid()); $conn->event->trigger("beforeRender",$data); - $output[]=$data->to_xml(); + $item = $data->to_xml(); + if ($item !== false) + $output[]=$item; $index++; } $this->unmix($config, $mix); @@ -228,7 +230,8 @@ class JSONTreeRenderStrategy extends TreeRenderStrategy { if (sizeof($temp)) $record["data"] = $temp; } - $output[] = $record; + if ($record !== false) + $output[] = $record; $index++; } $this->unmix($config, $mix); |