aboutsummaryrefslogtreecommitdiff
path: root/views/json
diff options
context:
space:
mode:
Diffstat (limited to 'views/json')
-rw-r--r--views/json/export/entity.php5
-rw-r--r--views/json/export/metadata.php5
-rw-r--r--views/json/export/relationship.php6
3 files changed, 10 insertions, 6 deletions
diff --git a/views/json/export/entity.php b/views/json/export/entity.php
index 83524cbd8..700784ca3 100644
--- a/views/json/export/entity.php
+++ b/views/json/export/entity.php
@@ -14,9 +14,10 @@
$entity = $vars['entity'];
$export = new stdClass;
+ $exportable_values = $entity->getExportableValues();
- foreach ($entity as $k => $v)
- $export->$k = $v;
+ foreach ($exportable_values as $v)
+ $export->$v = $entity->$v;
echo json_encode($export);
?> \ No newline at end of file
diff --git a/views/json/export/metadata.php b/views/json/export/metadata.php
index 0495e37b2..e56a0a7a1 100644
--- a/views/json/export/metadata.php
+++ b/views/json/export/metadata.php
@@ -14,9 +14,10 @@
$m = $vars['metadata'];
$export = new stdClass;
+ $exportable_values = $entity->getExportableValues();
- foreach ($m as $k => $v)
- $export->$k = $v;
+ foreach ($exportable_values as $v)
+ $export->$v = $m->$v;
echo json_encode($export);
?> \ No newline at end of file
diff --git a/views/json/export/relationship.php b/views/json/export/relationship.php
index 22acbba92..004ce9864 100644
--- a/views/json/export/relationship.php
+++ b/views/json/export/relationship.php
@@ -14,9 +14,11 @@
$r = $vars['relationship'];
$export = new stdClass;
+
+ $exportable_values = $entity->getExportableValues();
- foreach ($r as $k => $v)
- $export->$k = $v;
+ foreach ($exportable_values as $v)
+ $export->$v = $r->$v;
echo json_encode($export);
?> \ No newline at end of file