コード例 #1
0
ファイル: noticelist.php プロジェクト: Br3nda/StatusNet
 /**
  * show the form to repeat a notice
  *
  * @return void
  */
 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();
         }
     }
 }
コード例 #2
0
ファイル: SharePlugin.php プロジェクト: phpsource/gnu-social
 /**
  * show the "repeat" form in the notice options element
  * FIXME: Don't let a NoticeListItemAdapter slip in here (or extend that from NoticeListItem)
  *
  * @return void
  */
 public function onEndShowNoticeOptionItems($nli)
 {
     // FIXME: Use bitmasks (but be aware that PUBLIC_SCOPE is 0!)
     if ($nli->notice->scope == Notice::PUBLIC_SCOPE || $nli->notice->scope == Notice::SITE_SCOPE) {
         $scoped = Profile::current();
         if ($scoped instanceof Profile && $scoped->getID() !== $nli->notice->getProfile()->getID()) {
             if ($scoped->hasRepeated($nli->notice)) {
                 $nli->out->element('span', array('class' => 'repeated', 'title' => _('Notice repeated.')), _('Repeated'));
             } else {
                 $repeat = new RepeatForm($nli->out, $nli->notice);
                 $repeat->show();
             }
         }
     }
 }