aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/extender.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/extender.php')
-rw-r--r--engine/lib/extender.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/extender.php b/engine/lib/extender.php
index 51fc62c30..43421342c 100644
--- a/engine/lib/extender.php
+++ b/engine/lib/extender.php
@@ -105,6 +105,7 @@ function import_extender_plugin_hook($hook, $entity_type, $returnvalue, $params)
// Save
if (!$entity->save()) {
+ $attr_name = $element->getAttribute('name');
$msg = elgg_echo('ImportException:ProblemUpdatingMeta', array($attr_name, $entity_uuid));
throw new ImportException($msg);
}
@@ -120,7 +121,7 @@ function import_extender_plugin_hook($hook, $entity_type, $returnvalue, $params)
* @param string $type 'metadata' or 'annotation'
* @param int $user_guid The GUID of the user
*
- * @return true|false
+ * @return bool
*/
function can_edit_extender($extender_id, $type, $user_guid = 0) {
if (!elgg_is_logged_in()) {
@@ -155,7 +156,7 @@ function can_edit_extender($extender_id, $type, $user_guid = 0) {
}
// Trigger plugin hooks
- $params = array('entity' => $entity, 'user' => $user);
+ $params = array('entity' => $extender->getEntity(), 'user' => $user);
return elgg_trigger_plugin_hook('permissions_check', $type, $params, false);
}
@@ -164,9 +165,9 @@ function can_edit_extender($extender_id, $type, $user_guid = 0) {
* It is recommended that you do not call this directly, instead use
* one of the wrapper functions such as elgg_register_annotation_url_handler().
*
- * @param string $function_name The function to register
* @param string $extender_type Extender type ('annotation', 'metadata')
* @param string $extender_name The name of the extender
+ * @param string $function_name The function to register
*
* @return bool
*/