]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelistitem.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / lib / noticelistitem.php
index bb1eb17eb34479c032d7e050ddc8a0f9d77df1a7..7c303c48ef51df6c6f7fe29626861836dcb867b3 100644 (file)
@@ -180,7 +180,6 @@ class NoticeListItem extends Widget
             $this->showNoticeSource();
             $this->showNoticeLocation();
             $this->showPermalink();
-            $this->showRepeat();
             Event::handle('EndShowNoticeInfo', array($this));
         }
     }
@@ -189,7 +188,8 @@ class NoticeListItem extends Widget
     {
         if (Event::handle('StartShowNoticeOptions', array($this))) {
             $user = common_current_user();
-            if ($user) {
+
+            if ($user instanceof User) {
                 $this->out->elementStart('div', 'notice-options');
                 if (Event::handle('StartShowNoticeOptionItems', array($this))) {
                     $this->showReplyLink();
@@ -198,6 +198,7 @@ class NoticeListItem extends Widget
                 }
                 $this->out->elementEnd('div');
             }
+
             Event::handle('EndShowNoticeOptions', array($this));
         }
     }
@@ -527,32 +528,6 @@ class NoticeListItem extends Widget
         }
     }
 
-    /**
-     * show a link to the author of repeat
-     *
-     * @return void
-     */
-    function showRepeat()
-    {
-        if (!empty($this->repeat)) {
-
-            $repeater = Profile::getKV('id', $this->repeat->profile_id);
-
-            $attrs = array('href' => $repeater->profileurl,
-                           'class' => 'h-card p-author',
-                           'title' => $repeater->getFancyName());
-
-            $this->out->elementStart('span', 'repeat h-entry');
-
-            // TRANS: Addition in notice list item if notice was repeated. Followed by a span with a nickname.
-            $this->out->raw(_('Repeated by').' ');
-
-            $this->out->element('a', $attrs, $repeater->getNickname());
-
-            $this->out->elementEnd('span');
-        }
-    }
-
     /**
      * show a link to reply to the current notice
      *