summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-09-27 21:05:29 -0400
committerEvan Prodromou <evan@status.net>2009-09-27 21:11:45 -0400
commitee236e68df8a8b7ee7917fd60ef36b57c0bd64db (patch)
tree3448f203d961e24e9a89ea272d3e24b63a12983f /lib
parent38345d078343d4631eab2c883a39d87380f7b1af (diff)
show delete button when user has deleteOthersNotice right
Diffstat (limited to 'lib')
-rw-r--r--lib/noticelist.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index c2ff7c26b..6c296f82a 100644
--- a/lib/noticelist.php
+++ b/lib/noticelist.php
@@ -472,7 +472,10 @@ class NoticeListItem extends Widget
function showDeleteLink()
{
$user = common_current_user();
- if ($user && $this->notice->profile_id == $user->id) {
+
+ if (!empty($user) &&
+ ($this->notice->profile_id == $user->id || $user->hasRight(Right::deleteOthersNotice))) {
+
$deleteurl = common_local_url('deletenotice',
array('notice' => $this->notice->id));
$this->out->element('a', array('href' => $deleteurl,