Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
This commit is contained in:
commit
4af466f1a6
@ -68,22 +68,33 @@ class BookmarkListItem extends NoticeListItemAdapter
|
||||
|
||||
$atts = $notice->attachments();
|
||||
|
||||
if (count($atts) < 1) {
|
||||
// Something wrong; let default code deal with it.
|
||||
// TRANS: Exception thrown when a bookmark has no attachments.
|
||||
// TRANS: %1$s is a bookmark ID, %2$s is a notice ID (number).
|
||||
throw new Exception(sprintf(_m('Bookmark %1$s (notice %2$d) has no attachments.'),
|
||||
$nb->id,
|
||||
$notice->id));
|
||||
if (empty($atts)) {
|
||||
|
||||
// Something went wrong!
|
||||
|
||||
common_log(
|
||||
LOG_ERR,
|
||||
sprintf(
|
||||
'Bookmark %1$s (notice %2$d) has no attachments.',
|
||||
$nb->id,
|
||||
$notice->id
|
||||
)
|
||||
);
|
||||
|
||||
// try to show the notice as plain text
|
||||
|
||||
parent::showContent();
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
$att = $atts[0];
|
||||
|
||||
$out->elementStart('h3');
|
||||
$out->element('a',
|
||||
array('href' => $att->url,
|
||||
'class' => 'bookmark-title'),
|
||||
$nb->title);
|
||||
array('href' => $att->url,
|
||||
'class' => 'bookmark-title'),
|
||||
$nb->title);
|
||||
$out->elementEnd('h3');
|
||||
|
||||
// Replies look like "for:" tags
|
||||
|
Loading…
Reference in New Issue
Block a user