aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-02-26 15:21:14 +0100
committerMario Vavti <mario@mariovavti.com>2016-02-26 15:21:14 +0100
commit776bc51172f5c21348c674a8bb6bf5037bde6815 (patch)
tree53176f6348f2179204023978d9a5853463173ff1 /include/text.php
parentdf57c90d2d93fef1d021bee4b91a50b1b34ee938 (diff)
downloadvolse-hubzilla-776bc51172f5c21348c674a8bb6bf5037bde6815.tar.gz
volse-hubzilla-776bc51172f5c21348c674a8bb6bf5037bde6815.tar.bz2
volse-hubzilla-776bc51172f5c21348c674a8bb6bf5037bde6815.zip
fix link to photo album and make sure that small photos are not overwritten by body text.
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/text.php b/include/text.php
index 6b074d390..621f4cf93 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1444,7 +1444,7 @@ function prepare_body(&$item,$attach = false) {
call_hooks('prepare_body_init', $item);
-
+ $s = '';
$photo = '';
$is_photo = ((($item['verb'] === ACTIVITY_POST) && ($item['obj_type'] === ACTIVITY_OBJ_PHOTO)) ? true : false);
@@ -1454,7 +1454,7 @@ function prepare_body(&$item,$attach = false) {
// if original photo width is <= 640px prepend it to item body
if($object['link'][0]['width'] && $object['link'][0]['width'] <= 640) {
- $s = '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s;
+ $s .= '<div class="inline-photo-item-wrapper"><a href="' . zid(rawurldecode($object['id'])) . '" target="_blank"><img class="inline-photo-item" style="max-width:' . $object['link'][0]['width'] . 'px; width:100%; height:auto;" src="' . zid(rawurldecode($object['link'][0]['href'])) . '"></a></div>' . $s;
}
// if original photo width is > 640px make it a cover photo
@@ -1464,7 +1464,7 @@ function prepare_body(&$item,$attach = false) {
}
}
- $s = prepare_text($item['body'],$item['mimetype'], false);
+ $s .= prepare_text($item['body'],$item['mimetype'], false);
$event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event($item['object']) : false);