diff options
Diffstat (limited to 'mod/bookmarks/actions/bookmarks/delete.php')
-rw-r--r-- | mod/bookmarks/actions/bookmarks/delete.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mod/bookmarks/actions/bookmarks/delete.php b/mod/bookmarks/actions/bookmarks/delete.php new file mode 100644 index 000000000..48b4a2dd8 --- /dev/null +++ b/mod/bookmarks/actions/bookmarks/delete.php @@ -0,0 +1,29 @@ +<?php + + /** + * Elgg bookmarks delete action + * + * @package ElggBookmarks + */ + + $guid = get_input('bookmark_guid',0); + if ($entity = get_entity($guid)) { + + $container = get_entity($entity->container_guid); + if ($entity->canEdit()) { + + if ($entity->delete()) { + + system_message(elgg_echo("bookmarks:delete:success")); + forward("pg/bookmarks/owner/$container->username/"); + + } + + } + + } + + register_error(elgg_echo("bookmarks:delete:failed")); + forward(REFERER); + +?>
\ No newline at end of file |