Permalink
Browse files

thread: Keep attachments when editing thread entry

  • Loading branch information...
greezybacon committed Jun 12, 2016
1 parent cd6eae6 commit 907ec36bd9f8c37c38c34b510b5af4e3ae26fd2a
Showing with 5 additions and 0 deletions.
  1. +5 −0 include/class.thread_actions.php
@@ -164,6 +164,11 @@ function updateEntry($guard=false) {
$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 comments on commit 907ec36

Please sign in to comment.