diff options
-rw-r--r-- | engine/classes/ElggMetadata.php | 4 | ||||
-rw-r--r-- | engine/handlers/export_handler.php | 2 | ||||
-rw-r--r-- | engine/lib/deprecated-1.8.php | 4 | ||||
-rw-r--r-- | engine/lib/metadata.php | 12 |
4 files changed, 11 insertions, 11 deletions
diff --git a/engine/classes/ElggMetadata.php b/engine/classes/ElggMetadata.php index 764f49067..9c13e936e 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 = elgg_get_metadata_by_id($id); + $metadata = elgg_get_metadata_from_id($id); } if ($metadata) { @@ -104,6 +104,6 @@ class ElggMetadata extends ElggExtender { * @return ElggMetadata */ public function getObjectFromID($id) { - return elgg_get_metadata_by_id($id); + return elgg_get_metadata_from_id($id); } } diff --git a/engine/handlers/export_handler.php b/engine/handlers/export_handler.php index 652046ba1..b56a20b93 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 = elgg_get_metadata_by_id($id_or_name); + $m = elgg_get_metadata_from_id($id_or_name); break; case 'annotation' : $m = get_annotation($id_or_name); diff --git a/engine/lib/deprecated-1.8.php b/engine/lib/deprecated-1.8.php index cef705a1b..9bca873c5 100644 --- a/engine/lib/deprecated-1.8.php +++ b/engine/lib/deprecated-1.8.php @@ -3587,8 +3587,8 @@ function get_metadata_for_entity($entity_guid) { * @param int $id The id of the metadata being retrieved. * * @return mixed False on failure or ElggMetadata - * @deprecated 1.8 Use elgg_get_metadata_by_id() + * @deprecated 1.8 Use elgg_get_metadata_from_id() */ function get_metadata($id) { - return elgg_get_metadata_by_id($id); + return elgg_get_metadata_from_id($id); } diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index 7e4c1f68a..6724bcb70 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -31,7 +31,7 @@ function row_to_elggmetadata($row) { * * @return false|ElggMetadata */ -function elgg_get_metadata_by_id($id) { +function elgg_get_metadata_from_id($id) { $db_prefix = elgg_get_config('dbprefix'); $id = (int)$id; @@ -166,7 +166,7 @@ function create_metadata($entity_guid, $name, $value, $value_type, $owner_guid, $id = insert_data($query); if ($id !== false) { - $obj = elgg_get_metadata_by_id($id); + $obj = elgg_get_metadata_from_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 = elgg_get_metadata_by_id($id)) { + if (!$md = elgg_get_metadata_from_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 = elgg_get_metadata_by_id($id); + $obj = elgg_get_metadata_from_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 = elgg_get_metadata_by_id($id); + $metadata = elgg_get_metadata_from_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 = elgg_get_metadata_by_id($id)) { + if ($extender = elgg_get_metadata_from_id($id)) { return get_extender_url($extender); } return false; |