aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 22:03:09 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 22:03:09 +0000
commit34b7cd712e8c1a29f9e4a732514489a3c1505414 (patch)
tree80ec7ba8f839789ee74529110c65b73ada78f642
parentdaadd01b5eaf9da933a9fa35a0dec57bdca790a6 (diff)
downloadelgg-34b7cd712e8c1a29f9e4a732514489a3c1505414.tar.gz
elgg-34b7cd712e8c1a29f9e4a732514489a3c1505414.tar.bz2
Refs #650. Replaced get_metadata() by elgg_get_metadata_by_id()
git-svn-id: http://code.elgg.org/elgg/trunk@8178 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/classes/ElggMetadata.php4
-rw-r--r--engine/handlers/export_handler.php2
-rw-r--r--engine/lib/metadata.php10
3 files changed, 8 insertions, 8 deletions
diff --git a/engine/classes/ElggMetadata.php b/engine/classes/ElggMetadata.php
index 1c72b1bf0..764f49067 100644
--- a/engine/classes/ElggMetadata.php
+++ b/engine/classes/ElggMetadata.php
@@ -30,7 +30,7 @@ class ElggMetadata extends ElggExtender {
if ($id instanceof stdClass) {
$metadata = $id;
} else {
- $metadata = get_metadata($id);
+ $metadata = elgg_get_metadata_by_id($id);
}
if ($metadata) {
@@ -104,6 +104,6 @@ class ElggMetadata extends ElggExtender {
* @return ElggMetadata
*/
public function getObjectFromID($id) {
- return get_metadata($id);
+ return elgg_get_metadata_by_id($id);
}
}
diff --git a/engine/handlers/export_handler.php b/engine/handlers/export_handler.php
index 264ecce90..652046ba1 100644
--- a/engine/handlers/export_handler.php
+++ b/engine/handlers/export_handler.php
@@ -63,7 +63,7 @@ if (($guid != "") && ($type == "") && ($id_or_name == "")) {
$m->type = "attr";
break;
case 'metadata' :
- $m = get_metadata($id_or_name);
+ $m = elgg_get_metadata_by_id($id_or_name);
break;
case 'annotation' :
$m = get_annotation($id_or_name);
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 600e72e71..7e4c1f68a 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -166,7 +166,7 @@ function create_metadata($entity_guid, $name, $value, $value_type, $owner_guid,
$id = insert_data($query);
if ($id !== false) {
- $obj = get_metadata($id);
+ $obj = elgg_get_metadata_by_id($id);
if (elgg_trigger_event('create', 'metadata', $obj)) {
return $id;
} else {
@@ -195,7 +195,7 @@ function update_metadata($id, $name, $value, $value_type, $owner_guid, $access_i
$id = (int)$id;
- if (!$md = get_metadata($id)) {
+ if (!$md = elgg_get_metadata_by_id($id)) {
return false;
}
if (!$md->canEdit()) {
@@ -250,7 +250,7 @@ function update_metadata($id, $name, $value, $value_type, $owner_guid, $access_i
$result = update_data($query);
if ($result !== false) {
- $obj = get_metadata($id);
+ $obj = elgg_get_metadata_by_id($id);
if (elgg_trigger_event('update', 'metadata', $obj)) {
return true;
} else {
@@ -301,7 +301,7 @@ function delete_metadata($id) {
global $CONFIG;
$id = (int)$id;
- $metadata = get_metadata($id);
+ $metadata = elgg_get_metadata_by_id($id);
if ($metadata) {
// Tidy up if memcache is enabled.
@@ -927,7 +927,7 @@ function metadata_array_to_values($array) {
function get_metadata_url($id) {
$id = (int)$id;
- if ($extender = get_metadata($id)) {
+ if ($extender = elgg_get_metadata_by_id($id)) {
return get_extender_url($extender);
}
return false;