Commit a0ad110c authored by Mario's avatar Mario

fix summary and use item_normal_search() for viewsrc so we can also view the...

fix summary and use item_normal_search() for viewsrc so we can also view the source for articles, cards, etc.
parent 7f1e0313
......@@ -25,7 +25,7 @@ class Viewsrc extends \Zotlabs\Web\Controller {
notice( t('Item not found.') . EOL);
}
$item_normal = item_normal();
$item_normal = item_normal_search();
if(local_channel() && $item_id) {
$r = q("select id, mid, item_flags, mimetype, item_obscured, body, llink, plink from item where uid in (%d , %d) and id = %d $item_normal limit 1",
......
......@@ -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);
......
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