From 83d27eab014164d5988e6b16eaf5822f73218abb Mon Sep 17 00:00:00 2001 From: icewing Date: Tue, 18 Mar 2008 10:44:09 +0000 Subject: Marcus Povey * Get Metadata now actually works git-svn-id: https://code.elgg.org/elgg/trunk@244 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'engine') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 9c1de36f0..745b46ee6 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -112,7 +112,12 @@ */ public function getMetaData($name) { - return get_metadata_byname($name); + $md = get_metadata_byname($this->getGUID(), $name); + + if ($md) + return $md->value; + + return null; } /** @@ -227,10 +232,6 @@ public function getTimeCreated() { return $this->get('time_created'); } public function getTimeUpdated() { return $this->get('time_updated'); } - - // TODO: Friends/relationships - - /** * Save generic attributes to the entities table. */ -- cgit v1.2.3