From a0ad110cff00bc9c506f5e6b921e5bd350f98f98 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 21 Feb 2019 08:48:47 +0100 Subject: fix summary and use item_normal_search() for viewsrc so we can also view the source for articles, cards, etc. --- include/text.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index b017b038a..ad5f84b54 100644 --- a/include/text.php +++ b/include/text.php @@ -1682,7 +1682,12 @@ function prepare_body(&$item,$attach = false,$opts = false) { $s .= prepare_binary($item); } else { - $s .= prepare_text($item['body'],$item['mimetype'], $opts); + if($item['summary']) { + $s .= prepare_text('[summary]' . $item['summary'] . '[/summary]' . $item['body'],$item['mimetype'],$opts); + } + else { + $s .= prepare_text($item['body'],$item['mimetype'], $opts); + } } $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event_obj($item['obj']) : false); -- cgit v1.2.3