We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 4af466f1 authored by Evan Prodromou's avatar Evan Prodromou

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

parents 82badb19 e7ef9e21
......@@ -4,7 +4,7 @@
* Copyright (C) 2011, StatusNet, Inc.
* Adapter to show bookmarks in a nicer way
* PHP version 5
* This program is free software: you can redistribute it and/or modify
......@@ -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.'),
if (empty($atts)) {
// Something went wrong!
'Bookmark %1$s (notice %2$d) has no attachments.',
// try to show the notice as plain text
$att = $atts[0];
array('href' => $att->url,
'class' => 'bookmark-title'),
array('href' => $att->url,
'class' => 'bookmark-title'),
// Replies look like "for:" tags
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment