From: Evan Prodromou Date: Mon, 28 Sep 2009 01:05:29 +0000 (-0400) Subject: show delete button when user has deleteOthersNotice right X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ee236e68df8a8b7ee7917fd60ef36b57c0bd64db;p=quix0rs-gnu-social.git show delete button when user has deleteOthersNotice right --- diff --git a/lib/noticelist.php b/lib/noticelist.php index c2ff7c26b3..6c296f82a7 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,