X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticelistitem.php;h=097a5d06c44352a7f01febf515133c7120726df1;hb=32145484c28323c95c0f84a274fb13714b738a3d;hp=46f15f551d3fb63882550ad1e72fd0895f4edbca;hpb=908551ae3d20cab1a8b6c39eeda82c0c4af4c92b;p=quix0rs-gnu-social.git diff --git a/lib/noticelistitem.php b/lib/noticelistitem.php index 46f15f551d..097a5d06c4 100644 --- a/lib/noticelistitem.php +++ b/lib/noticelistitem.php @@ -596,17 +596,21 @@ class NoticeListItem extends Widget function showRepeatForm() { - $user = common_current_user(); - if ($user && $user->id != $this->notice->profile_id) { - $this->out->text(' '); - $profile = $user->getProfile(); - if ($profile->hasRepeated($this->notice->id)) { - $this->out->element('span', array('class' => 'repeated', - 'title' => _('Notice repeated')), - _('Repeated')); - } else { - $rf = new RepeatForm($this->out, $this->notice); - $rf->show(); + if ($this->notice->scope == Notice::PUBLIC_SCOPE || + $this->notice->scope == Notice::SITE_SCOPE) { + $user = common_current_user(); + if (!empty($user) && + $user->id != $this->notice->profile_id) { + $this->out->text(' '); + $profile = $user->getProfile(); + if ($profile->hasRepeated($this->notice->id)) { + $this->out->element('span', array('class' => 'repeated', + 'title' => _('Notice repeated')), + _('Repeated')); + } else { + $rf = new RepeatForm($this->out, $this->notice); + $rf->show(); + } } } }