Skip to content
Snippets Groups Projects
Commit 907ec36b authored by Jared Hancock's avatar Jared Hancock
Browse files

thread: Keep attachments when editing thread entry

parent cd6eae6c
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,11 @@ JS
$old = $original;
}
// Move the attachments to the new entry
$old->attachments->update(array(
'object_id' => $entry->id
));
// Mark the new entry as edited (but not hidden nor guarded)
$entry->flags = ($old->flags & ~(ThreadEntry::FLAG_HIDDEN | ThreadEntry::FLAG_GUARDED))
| ThreadEntry::FLAG_EDITED;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment