Bug: when deleting a child post and the "Move favorites to parent?" option is set, the parent's has_active_children flag is not cleared. `give_favorites_to_parent` moves the votes, and moving the votes has the side effect of reloading the post (to get the new score). But reloading the post wipes out the is_deleted_changed? flag, which is used by `update_parent_on_save`. Fix: update the `is_deleted` flag *before* moving favorites, so that the `update_parent_on_save` callback runs before `give_favorite_to_parent` runs.
91 KiB
91 KiB