diff options
author | Cash Costello <cash.costello@gmail.com> | 2012-07-09 19:38:24 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2012-07-09 19:38:24 -0400 |
commit | 5d9a8f414432e575b185c30b8e9764ab18f13ccd (patch) | |
tree | 8d64ec194f9379e884efd0bff963c5da17c0c90f /engine/lib | |
parent | f37be8abe23f6732c980137d7d1951ff5c0fdc35 (diff) | |
download | elgg-5d9a8f414432e575b185c30b8e9764ab18f13ccd.tar.gz elgg-5d9a8f414432e575b185c30b8e9764ab18f13ccd.tar.bz2 |
Refs #4631 $object->canEdit() check not necessary and added a confirm popup on delete to prevent accidental deletes
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/navigation.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 61d283f4b..10b11acfe 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -336,15 +336,16 @@ function elgg_river_menu_setup($hook, $type, $return, $params) { } } - if ($object->canEdit() && elgg_is_admin_logged_in()) { + if (elgg_is_admin_logged_in()) { $options = array( - 'name' => 'delete', - 'href' => "action/river/delete?id=$item->id", - 'text' => elgg_view_icon('delete'), - 'title' => elgg_echo('delete'), - 'is_action' => true, - 'priority' => 200, - ); + 'name' => 'delete', + 'href' => "action/river/delete?id=$item->id", + 'text' => elgg_view_icon('delete'), + 'title' => elgg_echo('delete'), + 'confirm' => elgg_echo('deleteconfirm'), + 'is_action' => true, + 'priority' => 200, + ); $return[] = ElggMenuItem::factory($options); } } |