aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metadata.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r--engine/lib/metadata.php35
1 files changed, 3 insertions, 32 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 99153a98a..3b84d3575 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -39,7 +39,8 @@
$objarray = (array) $metadata;
foreach($objarray as $key => $value) {
$this->attributes[$key] = $value;
- }
+ }
+ $this->attributes['type'] = "metadata";
}
}
}
@@ -73,38 +74,8 @@
return delete_metadata($this->id);
}
- /**
- * Determines whether or not the specified user can edit this
- *
- * @param int $user_guid The GUID of the user (defaults to currently logged in user)
- * @return true|false
- */
- function canEdit($user_guid = 0) {
- return can_edit_metadata($this->id,$user_guid);
- }
-
- }
-
- /**
- * Determines whether or not the specified user can edit the specified piece of metadata
- *
- * @param int $metadata_id The ID of the piece of metadata
- * @param int $user_guid The GUID of the user
- * @return true|false
- */
- function can_edit_metadata($metadata_id, $user_guid = 0) {
-
- if ($user_guid == 0) {
- $user = $_SESSION['user'];
- } else {
- $user = get_entity($user_guid);
- }
- $metadata = get_metadata($metadata_id);
-
- if ($metadata->owner_guid == $user->getGUID()) return true;
-
- return trigger_plugin_hook('permissions_check','metadata',array('entity' => $entity, 'user' => $user),false);
+
}
/**