preserve attachments when editing a post

This commit is contained in:
friendica 2014-02-14 13:15:02 -08:00
parent eadf5121d0
commit d9e4f63466

View File

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