diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-02 10:53:56 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-02 10:53:56 +0000 |
commit | 13821437caccdfc1862a6cc70a87db3d2a3bcefc (patch) | |
tree | eef8603ad414414763c17324b66cd7d3cb102641 /engine | |
parent | 5376ff1818cca5d7df7c5ffd674274a50815a38e (diff) | |
download | elgg-13821437caccdfc1862a6cc70a87db3d2a3bcefc.tar.gz elgg-13821437caccdfc1862a6cc70a87db3d2a3bcefc.tar.bz2 |
git-svn-id: https://code.elgg.org/elgg/trunk@349 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/entities.php | 3 | ||||
-rw-r--r-- | engine/lib/metadata.php | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 19bce724e..cff2f03a6 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -113,8 +113,7 @@ public function getMetaData($name) { $md = get_metadata_byname($this->getGUID(), $name); -echo $md->value; -if ($md) echo "TRUE"; + if ($md) return $md->value; diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 427379ad2..eb5096f3e 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -264,7 +264,7 @@ $meta_name = get_metastring_id($meta_name); $entity_guid = (int)$entity_guid; $access = get_access_list(); -echo "SELECT m.*, n.string as name, v.string as value from {$CONFIG->dbprefix}metadata m JOIN {$CONFIG->dbprefix}metastrings v on m.value_id = v.id JOIN {$CONFIG->dbprefix}metastrings n on m.name_id = n.id where m.entity_guid=$entity_guid and m.name_id='$meta_name' and (m.access_id in {$access} or (m.access_id = 0 and m.owner_guid = {$_SESSION['id']}))"; + $result = get_data("SELECT m.*, n.string as name, v.string as value from {$CONFIG->dbprefix}metadata m JOIN {$CONFIG->dbprefix}metastrings v on m.value_id = v.id JOIN {$CONFIG->dbprefix}metastrings n on m.name_id = n.id where m.entity_guid=$entity_guid and m.name_id='$meta_name' and (m.access_id in {$access} or (m.access_id = 0 and m.owner_guid = {$_SESSION['id']}))", "row_to_elggmetadata"); if (!$result) return false; |