diff options
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/annotations.php | 3 | ||||
-rw-r--r-- | engine/lib/metadata.php | 1 |
2 files changed, 1 insertions, 3 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php index d671e544b..dc37cb665 100644 --- a/engine/lib/annotations.php +++ b/engine/lib/annotations.php @@ -221,7 +221,7 @@ $entity_type = sanitise_string($entity_type); $entity_subtype = get_subtype_id($entity_type, $entity_subtype); $name = get_metastring_id($name); - $value = get_metastring_id($value); + if ($value != "") $value = get_metastring_id($value); $owner_guid = (int)$owner_guid; $limit = (int)$limit; $offset = (int)$offset; @@ -254,7 +254,6 @@ $query .= " $w and "; $query .= " (a.access_id in {$access} or (a.access_id = 0 and a.owner_guid = {$_SESSION['id']}))"; // Add access controls $query .= " order by $order_by limit $offset,$limit"; // Add order and limit - return get_data($query, "row_to_elggannotation"); } diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 3b84d3575..41ab51ac1 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -267,7 +267,6 @@ $meta_name = get_metastring_id($meta_name); $entity_guid = (int)$entity_guid; $access = get_access_list(); - $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; |