Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x

This commit is contained in:
Evan Prodromou 2011-09-30 14:25:06 -04:00
commit 4af466f1a6

View File

@ -68,13 +68,24 @@ class BookmarkListItem extends NoticeListItemAdapter
$atts = $notice->attachments(); $atts = $notice->attachments();
if (count($atts) < 1) { if (empty($atts)) {
// Something wrong; let default code deal with it.
// TRANS: Exception thrown when a bookmark has no attachments. // Something went wrong!
// 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.'), common_log(
LOG_ERR,
sprintf(
'Bookmark %1$s (notice %2$d) has no attachments.',
$nb->id, $nb->id,
$notice->id)); $notice->id
)
);
// try to show the notice as plain text
parent::showContent();
return;
} }
$att = $atts[0]; $att = $atts[0];