aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/navigation.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-07 03:03:04 +0200
committerSem <sembrestels@riseup.net>2012-07-07 03:03:04 +0200
commit2329cb233a8766ac1a6bc5d5b4d699f2ab773ea4 (patch)
tree9532b5aaa98df42a31d883af9a5ce22caad02ab5 /engine/lib/navigation.php
parentb2f46500941a2093734e7672a4de79aabd95b9fc (diff)
downloadelgg-2329cb233a8766ac1a6bc5d5b4d699f2ab773ea4.tar.gz
elgg-2329cb233a8766ac1a6bc5d5b4d699f2ab773ea4.tar.bz2
Fixes #4631. Admins are now able to delete river items.
Diffstat (limited to 'engine/lib/navigation.php')
-rw-r--r--engine/lib/navigation.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index 4ff009bfb..61d283f4b 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -335,6 +335,18 @@ function elgg_river_menu_setup($hook, $type, $return, $params) {
$return[] = ElggMenuItem::factory($options);
}
}
+
+ if ($object->canEdit() && 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,
+ );
+ $return[] = ElggMenuItem::factory($options);
+ }
}
return $return;