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
1 changed files with 22 additions and 11 deletions

View File

@ -68,13 +68,24 @@ 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.'),
if (empty($atts)) {
// Something went wrong!
common_log(
LOG_ERR,
sprintf(
'Bookmark %1$s (notice %2$d) has no attachments.',
$nb->id,
$notice->id));
$notice->id
)
);
// try to show the notice as plain text
parent::showContent();
return;
}
$att = $atts[0];