diff options
author | friendica <info@friendica.com> | 2014-02-14 13:15:02 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-02-14 13:15:02 -0800 |
commit | d9e4f634665ec4da69b5af230f45f2a0e9688a1b (patch) | |
tree | 23774222fe4abaa50a0621e8f598592680f2af83 /mod | |
parent | eadf5121d0f047ea297b04ce40ac51a9aa3d18dc (diff) | |
download | volse-hubzilla-d9e4f634665ec4da69b5af230f45f2a0e9688a1b.tar.gz volse-hubzilla-d9e4f634665ec4da69b5af230f45f2a0e9688a1b.tar.bz2 volse-hubzilla-d9e4f634665ec4da69b5af230f45f2a0e9688a1b.zip |
preserve attachments when editing a post
Diffstat (limited to 'mod')
-rw-r--r-- | mod/editpost.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mod/editpost.php b/mod/editpost.php index 918a70d36..8c4117e7a 100644 --- a/mod/editpost.php +++ b/mod/editpost.php @@ -92,6 +92,15 @@ function editpost_content(&$a) { } + if($itm[0]['attach']) { + $j = json_decode($itm[0]['attach'],true); + if($j) { + foreach($j as $jj) { + $itm[0]['body'] .= "\n" . '[attachment]' . basename($jj['href']) . ',' . $jj['revision'] . '[/attachment]' . "\n"; + } + } + } + $cipher = get_pconfig(get_app()->profile['profile_uid'],'system','default_cipher'); if(! $cipher) $cipher = 'aes256'; |