@@ 724-739 (lines=16) @@ | ||
721 | * @return bool |
|
722 | * @since 1.8 |
|
723 | */ |
|
724 | public function deleteOwnedAnnotations($name = null) { |
|
725 | // access is turned off for this because they might |
|
726 | // no longer have access to an entity they created annotations on. |
|
727 | $ia = elgg_set_ignore_access(true); |
|
728 | $options = [ |
|
729 | 'annotation_owner_guid' => $this->guid, |
|
730 | 'limit' => 0 |
|
731 | ]; |
|
732 | if ($name) { |
|
733 | $options['annotation_name'] = $name; |
|
734 | } |
|
735 | ||
736 | $r = elgg_delete_annotations($options); |
|
737 | elgg_set_ignore_access($ia); |
|
738 | return $r; |
|
739 | } |
|
740 | ||
741 | /** |
|
742 | * Disables annotations for this entity, optionally based on name. |
|
@@ 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 = [ |
|
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 | * Disables metadata for this entity, optionally based on name. |