summaryrefslogtreecommitdiffstats
path: root/codebase
diff options
context:
space:
mode:
Diffstat (limited to 'codebase')
-rw-r--r--codebase/data_connector.php4
-rw-r--r--codebase/strategy.php7
2 files changed, 7 insertions, 4 deletions
diff --git a/codebase/data_connector.php b/codebase/data_connector.php
index 2a4e0a3..e4e5e08 100644
--- a/codebase/data_connector.php
+++ b/codebase/data_connector.php
@@ -266,7 +266,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()
@@ -437,7 +437,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 eb579b8..e81e55a 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);
@@ -223,7 +225,8 @@ class JSONTreeRenderStrategy extends TreeRenderStrategy {
if (sizeof($temp))
$record["data"] = $temp;
}
- $output[] = $record;
+ if ($record !== false)
+ $output[] = $record;
$index++;
}
$this->unmix($config, $mix);