fix summary and use item_normal_search() for viewsrc so we can also view the source for articles, cards, etc.

(cherry picked from commit a0ad110cff)
This commit is contained in:
Mario Vavti
2019-02-21 07:48:47 +00:00
committed by Mario
parent 89ee28f858
commit 93039081d5
2 changed files with 7 additions and 2 deletions

View File

@@ -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);