From bab90941c9faea31651bb8b562ddec6b5a82292c Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 19 Nov 2008 21:16:49 +0000 Subject: Fixes #568: Exportable code now inclusive not exclusive. * Added extra function Exportable interface * OpenDD export modified * PHP & JSON export views modified * Default export view will still show all data if you are logged in as admin (since this view is used by the guidtool) git-svn-id: https://code.elgg.org/elgg/trunk@2467 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/php/export/entity.php | 9 ++++++++- views/php/export/metadata.php | 9 ++++++++- views/php/export/relationship.php | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) (limited to 'views/php/export') 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 -- cgit v1.2.3