]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/noticelist.php
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
[quix0rs-gnu-social.git] / lib / noticelist.php
index 7c88c33cc44ccb5615571a3b966747e485be21e4..4182d8808f7046520a9453e8ab1c90b6562083dd 100644 (file)
@@ -203,11 +203,14 @@ class NoticeListItem extends Widget
 
     function showNoticeOptions()
     {
-        $this->out->elementStart('div', 'notice-options');
-        $this->showFaveForm();
-        $this->showReplyLink();
-        $this->showDeleteLink();
-        $this->out->elementEnd('div');
+        $user = common_current_user();
+        if ($user) {
+            $this->out->elementStart('div', 'notice-options');
+            $this->showFaveForm();
+            $this->showReplyLink();
+            $this->showDeleteLink();
+            $this->out->elementEnd('div');
+        }
     }
 
     /**
@@ -255,8 +258,12 @@ class NoticeListItem extends Widget
     function showAuthor()
     {
         $this->out->elementStart('span', 'vcard author');
-        $this->out->elementStart('a', array('href' => $this->profile->profileurl,
-                                            'class' => 'url'));
+        $attrs = array('href' => $this->profile->profileurl,
+                       'class' => 'url');
+        if (!empty($this->profile->fullname)) {
+            $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ') ';
+        }
+        $this->out->elementStart('a', $attrs);
         $this->showAvatar();
         $this->showNickname();
         $this->out->elementEnd('a');
@@ -282,8 +289,8 @@ class NoticeListItem extends Widget
         $avatar = $this->profile->getAvatar($avatar_size);
 
         $this->out->element('img', array('src' => ($avatar) ?
-                                         common_avatar_display_url($avatar) :
-                                         common_default_avatar($avatar_size),
+                                         $avatar->displayUrl() :
+                                         Avatar::defaultImage($avatar_size),
                                          'class' => 'avatar photo',
                                          'width' => $avatar_size,
                                          'height' => $avatar_size,
@@ -384,6 +391,7 @@ class NoticeListItem extends Widget
              case 'xmpp':
              case 'mail':
              case 'omb':
+             case 'system':
              case 'api':
                 $this->out->element('dd', null, $source_name);
                 break;