]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelistitem.php
Qvitter API changes (thanks hannes2peer)
[quix0rs-gnu-social.git] / lib / noticelistitem.php
index d045f0034299a46fd4a932b4c094c8e4273154bd..19d6674ae35f9387590f70f0f0a0d3ae6514aed3 100644 (file)
@@ -73,7 +73,7 @@ class NoticeListItem extends Widget
     {
         parent::__construct($out);
         if (!empty($notice->repeat_of)) {
-            $original = Notice::staticGet('id', $notice->repeat_of);
+            $original = Notice::getKV('id', $notice->repeat_of);
             if (empty($original)) { // could have been deleted
                 $this->notice = $notice;
             } else {
@@ -272,7 +272,7 @@ class NoticeListItem extends Widget
         $groups = $this->getGroups();
 
         $user = common_current_user();
-        
+
         $streamNicknames = !empty($user) && $user->streamNicknames();
 
         foreach ($groups as $group) {
@@ -297,7 +297,7 @@ class NoticeListItem extends Widget
         $replies = $this->getReplyProfiles();
 
         $user = common_current_user();
-        
+
         $streamNicknames = !empty($user) && $user->streamNicknames();
 
         foreach ($replies as $reply) {
@@ -327,11 +327,9 @@ class NoticeListItem extends Widget
     {
         $avatar_size = $this->avatarSize();
 
-        $avatar = $this->profile->getAvatar($avatar_size);
+        $avatarUrl = $this->profile->avatarUrl($avatar_size);
 
-        $this->out->element('img', array('src' => ($avatar) ?
-                                         $avatar->displayUrl() :
-                                         Avatar::defaultImage($avatar_size),
+        $this->out->element('img', array('src' => $avatarUrl,
                                          'class' => 'avatar photo',
                                          'width' => $avatar_size,
                                          'height' => $avatar_size,
@@ -571,7 +569,7 @@ class NoticeListItem extends Widget
     function showContext()
     {
         if ($this->notice->hasConversation()) {
-            $conv = Conversation::staticGet(
+            $conv = Conversation::getKV(
                 'id',
                 $this->notice->conversation
             );
@@ -607,7 +605,7 @@ class NoticeListItem extends Widget
     {
         if (!empty($this->repeat)) {
 
-            $repeater = Profile::staticGet('id', $this->repeat->profile_id);
+            $repeater = Profile::getKV('id', $this->repeat->profile_id);
 
             $attrs = array('href' => $repeater->profileurl,
                            'class' => 'url');
@@ -620,7 +618,7 @@ class NoticeListItem extends Widget
 
             // TRANS: Addition in notice list item if notice was repeated. Followed by a span with a nickname.
             $this->out->raw(_('Repeated by'));
-            $this->out->raw(_(' '));
+            $this->out->raw(' ');
 
             $this->out->elementStart('a', $attrs);
             $this->out->element('span', 'fn nickname', $repeater->nickname);
@@ -695,7 +693,7 @@ class NoticeListItem extends Widget
                 $user->id != $this->notice->profile_id) {
                 $this->out->text(' ');
                 $profile = $user->getProfile();
-                if ($profile->hasRepeated($this->notice->id)) {
+                if ($profile->hasRepeated($this->notice)) {
                     $this->out->element('span', array('class' => 'repeated',
                                                       // TRANS: Title for repeat form status in notice list when a notice has been repeated.
                                                       'title' => _('Notice repeated.')),