| @@ 3793-3812 (lines=20) @@ | ||
| 3790 | * @return bool Depending on success |
|
| 3791 | * @deprecated 1.8 Use elgg_delete_metadata() |
|
| 3792 | */ |
|
| 3793 | function remove_metadata($guid, $name, $value = "") { |
|
| 3794 | elgg_deprecated_notice('delete_metadata() is deprecated by elgg_delete_metadata()', 1.8); |
|
| 3795 | ||
| 3796 | // prevent them from deleting everything |
|
| 3797 | if (!$guid) { |
|
| 3798 | return false; |
|
| 3799 | } |
|
| 3800 | ||
| 3801 | $options = array( |
|
| 3802 | 'guid' => $guid, |
|
| 3803 | 'metadata_name' => $name, |
|
| 3804 | 'limit' => 0 |
|
| 3805 | ); |
|
| 3806 | ||
| 3807 | if ($value) { |
|
| 3808 | $options['metadata_value'] = $value; |
|
| 3809 | } |
|
| 3810 | ||
| 3811 | return elgg_delete_metadata($options); |
|
| 3812 | } |
|
| 3813 | ||
| 3814 | /** |
|
| 3815 | * Get a specific annotation. |
|
| @@ 2856-2868 (lines=13) @@ | ||
| 2853 | * @return \ElggEntity|false |
|
| 2854 | * @deprecated 1.9 |
|
| 2855 | */ |
|
| 2856 | function get_entity_from_uuid($uuid) { |
|
| 2857 | elgg_deprecated_notice(__FUNCTION__ . ' is deprecated', 1.9); |
|
| 2858 | $uuid = sanitise_string($uuid); |
|
| 2859 | ||
| 2860 | $options = array('metadata_name' => 'import_uuid', 'metadata_value' => $uuid); |
|
| 2861 | $entities = elgg_get_entities_from_metadata($options); |
|
| 2862 | ||
| 2863 | if ($entities) { |
|
| 2864 | return $entities[0]; |
|
| 2865 | } |
|
| 2866 | ||
| 2867 | return false; |
|
| 2868 | } |
|
| 2869 | ||
| 2870 | /** |
|
| 2871 | * Tag a previously created guid with the uuid it was imported on. |
|