FriendsOfFlarum / split

Split Flarum posts into a new discussion
MIT License
12 stars 14 forks source link

Improve split functions #44

Closed rafaucau closed 3 years ago

rafaucau commented 3 years ago

Changes proposed in this pull request:

This PR adds the ability to split posts to an existing discussion instead of creating a new one.

Additionally, this PR adds:

Screenshot

image

Confirmed

rafaucau commented 3 years ago

Thanks to @simon1222 for helping with this. He wrote a function for moving posts that works even with discussions that have a large number of posts (even 120k)

Hari-Bonda commented 3 years ago

one quick question, if a discussion has only one post and we move it into a different discussion will the old discussion will be soft-deleted or the old post stays no posts?

rafaucau commented 3 years ago

I had a thought a while back to drop fof/split and fof/merge-discussions, and create a new fof/split-and-merge extension in their place. Seeing this PR has reignited that thought process.

Yes, there is some duplication of code on the frontend and it would be worth merging them.

Tonight or tomorrow I'll try to find time to fix the SQL Injection problem.

rafaucau commented 3 years ago

Due to lack of time I unfortunately cannot continue to develop this PR further. I already maintain my own version of this extension on my forum anyway. If anyone has the time and willingness then please help to complete this PR.

rafaucau commented 3 years ago

The Move Posts extension was released, so there is no point in continuing this PR https://discuss.flarum.org/d/28824-move-posts