X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fnoticelist.php;h=0d4cd4dd91c7d87ab68a89065be58121b1f345fc;hb=67f2f01c5e1cad743e849cdaaaf11deb6e435844;hp=7d1d2828fcb94d2cbdbef8e77d409288bd9608f1;hpb=1883da64185022866572f9eb27938b4cc7724328;p=quix0rs-gnu-social.git diff --git a/lib/noticelist.php b/lib/noticelist.php index 7d1d2828fc..0d4cd4dd91 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -442,11 +442,14 @@ class NoticeListItem extends Widget 'title' => $latlon), $name); } else { - $this->out->elementStart('a', array('href' => $url)); - $this->out->element('abbr', array('class' => 'geo', - 'title' => $latlon), - $name); - $this->out->elementEnd('a'); + $xstr = new XMLStringer(false); + $xstr->elementStart('a', array('href' => $url, + 'rel' => 'external')); + $xstr->element('abbr', array('class' => 'geo', + 'title' => $latlon), + $name); + $xstr->elementEnd('a'); + $this->out->raw($xstr->getString()); } $this->out->elementEnd('span'); } @@ -541,18 +544,39 @@ class NoticeListItem extends Widget { $hasConversation = false; if (!empty($this->notice->conversation)) { - $conversation = Notice::conversationStream($this->notice->conversation, 1, 1); + $conversation = Notice::conversationStream( + $this->notice->conversation, + 1, + 1 + ); if ($conversation->N > 0) { $hasConversation = true; } } if ($hasConversation) { - $this->out->text(' '); - $convurl = common_local_url('conversation', - array('id' => $this->notice->conversation)); - $this->out->element('a', array('href' => $convurl.'#notice-'.$this->notice->id, - 'class' => 'response'), - _('in context')); + $conv = Conversation::staticGet( + 'id', + $this->notice->conversation + ); + $convurl = $conv->uri; + if (!empty($convurl)) { + $this->out->text(' '); + $this->out->element( + 'a', + array( + 'href' => $convurl.'#notice-'.$this->notice->id, + 'class' => 'response'), + _('in context') + ); + } else { + $msg = sprintf( + "Couldn't find Conversation ID %d to make 'in context'" + . "link for Notice ID %d", + $this->notice->conversation, + $this->notice->id + ); + common_log(LOG_WARNING, $msg); + } } }