diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-10 22:22:40 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-10 22:22:40 +0000 |
commit | c8f6c3c934df01bf969e3d91ae67f0887de10da9 (patch) | |
tree | d21179fda1e19d540eb3ea56b31584f86fc1e338 /engine/lib/metadata.php | |
parent | a7801c71ecc6ce0f0d2a8fc82cdc779da9417aa4 (diff) | |
download | elgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.gz elgg-c8f6c3c934df01bf969e3d91ae67f0887de10da9.tar.bz2 |
Fixes #2367: With fear and trepidation, converting events/plugin hooks to use elgg_ prefixed versions
git-svn-id: http://code.elgg.org/elgg/trunk@7284 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r-- | engine/lib/metadata.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index af366f99a..ffa7b74e0 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -161,7 +161,7 @@ function create_metadata($entity_guid, $name, $value, $value_type, $owner_guid, if ($id !== false) { $obj = get_metadata($id); - if (trigger_elgg_event('create', 'metadata', $obj)) { + if (elgg_trigger_event('create', 'metadata', $obj)) { return $id; } else { delete_metadata($id); @@ -245,7 +245,7 @@ function update_metadata($id, $name, $value, $value_type, $owner_guid, $access_i $result = update_data($query); if ($result !== false) { $obj = get_metadata($id); - if (trigger_elgg_event('update', 'metadata', $obj)) { + if (elgg_trigger_event('update', 'metadata', $obj)) { return true; } else { delete_metadata($id); @@ -308,7 +308,7 @@ function delete_metadata($id) { $metabyname_memcache->delete("{$metadata->entity_guid}:{$metadata->name_id}"); } - if (($metadata->canEdit()) && (trigger_elgg_event('delete', 'metadata', $metadata))) { + if (($metadata->canEdit()) && (elgg_trigger_event('delete', 'metadata', $metadata))) { return delete_data("DELETE from {$CONFIG->dbprefix}metadata where id=$id"); } } @@ -1342,13 +1342,13 @@ function register_metadata_url_handler($function_name, $extender_name = "all") { } /** Register the hook */ -register_plugin_hook("export", "all", "export_metadata_plugin_hook", 2); +elgg_register_plugin_hook_handler("export", "all", "export_metadata_plugin_hook", 2); /** Call a function whenever an entity is updated **/ -register_elgg_event_handler('update', 'all', 'metadata_update'); +elgg_register_event_handler('update', 'all', 'metadata_update'); // unit testing -register_plugin_hook('unit_test', 'system', 'metadata_test'); +elgg_register_plugin_hook_handler('unit_test', 'system', 'metadata_test'); /** * Metadata unit test |