diff options
author | zotlabs <mike@macgirvin.com> | 2017-06-11 16:25:14 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-06-11 16:25:14 -0700 |
commit | f28fa0ab5a46a231695a851f2345a3669419c842 (patch) | |
tree | dfde598a178d05e4277caa29f6c732f59d965c14 /include/text.php | |
parent | 61bf77f668023da328acb386d586be843d7b382b (diff) | |
parent | 643a62038e002c8944dda37f4023129bb50272c1 (diff) | |
download | volse-hubzilla-f28fa0ab5a46a231695a851f2345a3669419c842.tar.gz volse-hubzilla-f28fa0ab5a46a231695a851f2345a3669419c842.tar.bz2 volse-hubzilla-f28fa0ab5a46a231695a851f2345a3669419c842.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 6f5c48679..d8438b2b1 100644 --- a/include/text.php +++ b/include/text.php @@ -1562,7 +1562,12 @@ function prepare_body(&$item,$attach = false) { } } - $s .= prepare_text($item['body'],$item['mimetype'], false); + if($item['item_obscured']) { + $s .= prepare_binary($item); + } + else { + $s .= prepare_text($item['body'],$item['mimetype'], false); + } $event = (($item['obj_type'] === ACTIVITY_OBJ_EVENT) ? format_event_obj($item['obj']) : false); @@ -1625,6 +1630,17 @@ function prepare_body(&$item,$attach = false) { return $prep_arr; } + +function prepare_binary($item) { + return replace_macros(get_markup_template('item_binary.tpl'), [ + '$download' => t('Download binary/encrypted content'), + '$url' => z_root() . '/viewsrc/' . $item['id'] . '/download' + ]); +} + + + + /** * @brief Given a text string, convert from bbcode to html and add smilie icons. * @@ -2897,7 +2913,7 @@ function pdl_selector($uid, $current='') { $sql_extra = item_permissions_sql($uid); - $r = q("select iconfig.*, mid from item_id left join item on iconfig.iid = item.id + $r = q("select iconfig.*, mid from iconfig left join item on iconfig.iid = item.id where item.uid = %d and iconfig.cat = 'system' and iconfig.k = 'PDL' $sql_extra order by v asc", intval($uid) ); |