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 --- engine/lib/extender.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'engine/lib/extender.php') diff --git a/engine/lib/extender.php b/engine/lib/extender.php index 206d98be4..b7c354c99 100644 --- a/engine/lib/extender.php +++ b/engine/lib/extender.php @@ -122,6 +122,22 @@ // EXPORTABLE INTERFACE //////////////////////////////////////////////////////////// + /** + * Return an array of fields which can be exported. + */ + public function getExportableValues() + { + return array( + 'id', + 'entity_guid', + 'name', + 'value', + 'value_type', + 'owner_guid', + 'type', + ); + } + /** * Export this object * @@ -131,7 +147,7 @@ { $uuid = get_uuid_from_object($this); - $meta = new ODDMetadata($uuid, guid_to_uuid($this->entity_guid), $this->attributes['name'], $this->attributes['value'], $type, guid_to_uuid($this->owner_guid)); + $meta = new ODDMetadata($uuid, guid_to_uuid($this->entity_guid), $this->attributes['name'], $this->attributes['value'], $this->attributes['type'], guid_to_uuid($this->owner_guid)); $meta->setAttribute('published', date("r", $this->time_created)); return $meta; -- cgit v1.2.3