aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-14 13:15:02 -0800
committerfriendica <info@friendica.com>2014-02-14 13:15:02 -0800
commitd9e4f634665ec4da69b5af230f45f2a0e9688a1b (patch)
tree23774222fe4abaa50a0621e8f598592680f2af83 /mod
parenteadf5121d0f047ea297b04ce40ac51a9aa3d18dc (diff)
downloadvolse-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.php9
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';