aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/annotations.php17
-rw-r--r--engine/lib/extender.php17
-rw-r--r--engine/lib/metadata.php17
3 files changed, 18 insertions, 33 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 4302d27a6..5e59d2e88 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -26,7 +26,7 @@
* @subpackage Core
* @author Marcus Povey <marcus@dushka.co.uk>
*/
- class ElggAnnotation extends ElggExtender implements Exportable
+ class ElggAnnotation extends ElggExtender
{
/**
@@ -100,21 +100,6 @@
return delete_annotation($this->id);
}
- /**
- * Export this object
- *
- * @return array
- */
- public function export()
- {
- $type = "annotation";
- $uuid = guid_to_uuid($this->entity_guid). $type . "/{$this->id}/";
-
- $meta = new ODDMetadata($uuid, guid_to_uuid($this->entity_guid), $this->attributes[$name], $this->attributes['value'], $type, guid_to_uuid($this->owner_guid));
- $meta->setAttribute('published', date("r", $this->time_created));
-
- return $meta;
- }
}
/**
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 88542a494..9762526aa 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -18,7 +18,7 @@
* @package Elgg
* @subpackage Core
*/
- abstract class ElggExtender
+ abstract class ElggExtender implements Exportable
{
/**
* This contains the site's main properties (id, etc)
@@ -100,6 +100,21 @@
return can_edit_extender($this->id,$this->type,$user_guid);
}
+ /**
+ * Export this object
+ *
+ * @return array
+ */
+ public function export()
+ {
+ $type = $this->attributes['type'];
+ $uuid = guid_to_uuid($this->entity_guid). $type . "/{$this->id}/";
+
+ $meta = new ODDMetadata($uuid, guid_to_uuid($this->entity_guid), $this->attributes[$name], $this->attributes['value'], $type, guid_to_uuid($this->owner_guid));
+ $meta->setAttribute('published', date("r", $this->time_created));
+
+ return $meta;
+ }
}
/**
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index d05688ea3..5a91c6536 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -19,7 +19,7 @@
* @package Elgg
* @subpackage Core
*/
- class ElggMetadata extends ElggExtender implements Exportable
+ class ElggMetadata extends ElggExtender
{
/**
@@ -95,21 +95,6 @@
return delete_metadata($this->id);
}
- /**
- * Export this object
- *
- * @return array
- */
- public function export()
- {
- $type = "metadata";
- $uuid = guid_to_uuid($this->entity_guid). $type . "/{$this->id}/";
-
- $meta = new ODDMetadata($uuid, guid_to_uuid($this->entity_guid), $this->attributes[$name], $this->attributes['value'], $type, guid_to_uuid($this->owner_guid));
- $meta->setAttribute('published', date("r", $this->time_created));
-
- return $meta;
- }
}
/**