summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-25 14:15:54 -0700
committerBrion Vibber <brion@pobox.com>2010-03-25 14:15:54 -0700
commitc11064a5398db824f2623c5763b3fdfdf8ae3c39 (patch)
tree86663a25bea567c4e0962cb3e63a79f7f82af891 /plugins/OStatus
parent7fc8b6af4ae9a784b797d4f7aef49c820bb10bdf (diff)
Updated 'more' anchor for attachments to do an XHR GET
Conflicts: lib/attachmentlist.php plugins/OStatus/classes/Ostatus_profile.php Merge tried to delete things that it seems it shouldn't, very confusing order. Hope rest of the cherry-picking isn't a problem.
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/classes/Ostatus_profile.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php
index c7e3b0509..51a426dc4 100644
--- a/plugins/OStatus/classes/Ostatus_profile.php
+++ b/plugins/OStatus/classes/Ostatus_profile.php
@@ -555,9 +555,21 @@ class Ostatus_profile extends Memcached_DataObject
$shortSummary = substr($shortSummary,
0,
Notice::maxContent() - (mb_strlen($url) + 2));
- $shortSummary .= '… ' . $url;
- $content = $shortSummary;
- $rendered = common_render_text($content);
+ $shortSummary .= '…';
+ $content = $shortSummary . ' ' . $url;
+
+ // We mark up the attachment link specially for the HTML output
+ // so we can fold-out the full version inline.
+ $attachUrl = common_local_url('attachment',
+ array('attachment' => $attachment->id));
+ $rendered = common_render_text($shortSummary) .
+ ' ' .
+ '<a href="' .
+ htmlspecialchars($attachUrl) .
+ '" class="attachment more">' .
+ // TRANS: expansion link for too-long remote messages
+ htmlspecialchars(_m('more')) .
+ '</a>';
}
}