]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
show delete button when user has deleteOthersNotice right
authorEvan Prodromou <evan@status.net>
Mon, 28 Sep 2009 01:05:29 +0000 (21:05 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 28 Sep 2009 01:11:45 +0000 (21:11 -0400)
lib/noticelist.php

index c2ff7c26b34253eacf2d2417d3ba11e6d592f7d7..6c296f82a7bfb154db87c28686b3a3592236de74 100644 (file)
@@ -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,