@@ 493-508 (lines=16) @@ | ||
490 | * @return bool |
|
491 | * @since 1.8 |
|
492 | */ |
|
493 | public function deleteOwnedMetadata($name = null) { |
|
494 | // access is turned off for this because they might |
|
495 | // no longer have access to an entity they created metadata on. |
|
496 | $ia = elgg_set_ignore_access(true); |
|
497 | $options = array( |
|
498 | 'metadata_owner_guid' => $this->guid, |
|
499 | 'limit' => 0 |
|
500 | ); |
|
501 | if ($name) { |
|
502 | $options['metadata_name'] = $name; |
|
503 | } |
|
504 | ||
505 | $r = elgg_delete_metadata($options); |
|
506 | elgg_set_ignore_access($ia); |
|
507 | return $r; |
|
508 | } |
|
509 | ||
510 | /** |
|
511 | * Remove metadata |
|
@@ 740-755 (lines=16) @@ | ||
737 | * @return bool |
|
738 | * @since 1.8 |
|
739 | */ |
|
740 | public function deleteOwnedAnnotations($name = null) { |
|
741 | // access is turned off for this because they might |
|
742 | // no longer have access to an entity they created annotations on. |
|
743 | $ia = elgg_set_ignore_access(true); |
|
744 | $options = array( |
|
745 | 'annotation_owner_guid' => $this->guid, |
|
746 | 'limit' => 0 |
|
747 | ); |
|
748 | if ($name) { |
|
749 | $options['annotation_name'] = $name; |
|
750 | } |
|
751 | ||
752 | $r = elgg_delete_annotations($options); |
|
753 | elgg_set_ignore_access($ia); |
|
754 | return $r; |
|
755 | } |
|
756 | ||
757 | /** |
|
758 | * Disables annotations for this entity, optionally based on name. |