aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/default/export/entity.php3
-rw-r--r--views/json/export/entity.php5
-rw-r--r--views/json/export/metadata.php5
-rw-r--r--views/json/export/relationship.php6
-rw-r--r--views/php/export/entity.php9
-rw-r--r--views/php/export/metadata.php9
-rw-r--r--views/php/export/relationship.php9
7 files changed, 37 insertions, 9 deletions
diff --git a/views/default/export/entity.php b/views/default/export/entity.php
index 38d2d0902..0e6e26025 100644
--- a/views/default/export/entity.php
+++ b/views/default/export/entity.php
@@ -18,16 +18,19 @@
$annotations = get_annotations($entity->guid);
$relationships = get_entity_relationships($entity->guid);
+ $exportable_values = $entity->getExportableValues();
?>
<div>
<?php
foreach ($entity as $k => $v)
{
+ if ((in_array($k, $exportable_values)) || (isadminloggedin())) {
?>
<div>
<p><b><?php echo $k; ?>: </b><?php echo $v; ?></p>
</div>
<?php
+ }
}
?>
</div>
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
diff --git a/views/php/export/entity.php b/views/php/export/entity.php
index fbde3ef0d..d167a1df3 100644
--- a/views/php/export/entity.php
+++ b/views/php/export/entity.php
@@ -12,5 +12,12 @@
*/
$entity = $vars['entity'];
- echo serialize($entity);
+
+ $export = new stdClass;
+ $exportable_values = $entity->getExportableValues();
+
+ foreach ($exportable_values as $v)
+ $export->$v = $entity->$v;
+
+ echo serialize($export);
?> \ No newline at end of file
diff --git a/views/php/export/metadata.php b/views/php/export/metadata.php
index 1af6f065d..d7939bb82 100644
--- a/views/php/export/metadata.php
+++ b/views/php/export/metadata.php
@@ -12,5 +12,12 @@
*/
$m = $vars['metadata'];
- echo serialize($m);
+
+ $export = new stdClass;
+ $exportable_values = $m->getExportableValues();
+
+ foreach ($exportable_values as $v)
+ $export->$v = $m->$v;
+
+ echo serialize($export);
?> \ No newline at end of file
diff --git a/views/php/export/relationship.php b/views/php/export/relationship.php
index e66719f7c..58456c51c 100644
--- a/views/php/export/relationship.php
+++ b/views/php/export/relationship.php
@@ -12,5 +12,12 @@
*/
$r = $vars['relationship'];
- echo serialize($r);
+
+ $export = new stdClass;
+ $exportable_values = $r->getExportableValues();
+
+ foreach ($exportable_values as $v)
+ $export->$v = $r->$v;
+
+ echo serialize($export);
?> \ No newline at end of file