2019-02-23, 12:31 PM
2019-02-23, 06:50 PM
If soft delete is not enabled this line deletes the post permanently:
https://github.com/mybb/mybb/blob/featur....php#L2059
https://github.com/mybb/mybb/blob/featur....php#L2059
2019-02-24, 04:25 AM
It is very weird how that isn't by the other condition.
2019-02-24, 05:43 AM
Yes it is. Was no need to pass through similar condition loops just for the sake of making single log line.
But the code is correct and doing the job.
Also foreach can / should be optimized to single query with multiple pids. Its a huge number of queries if we are deleting many posts at once.
But the code is correct and doing the job.
Also foreach can / should be optimized to single query with multiple pids. Its a huge number of queries if we are deleting many posts at once.
2019-02-24, 10:47 PM
(2019-02-24, 05:43 AM)effone Wrote: [ -> ]Yes it is. Was no need to pass through similar condition loops just for the sake of making single log line.
But the code is correct and doing the job.
Also foreach can / should be optimized to single query with multiple pids. Its a huge number of queries if we are deleting many posts at once.
I might address this in my plugin for Restoring Soft Deleted Threads and Posts. I'm thinking doing a select query on posts using an IN clause with pids to get the list of threads and forums that need to be updated. After that run a delete query with an IN clause so all posts can be deleted in one go. Then update the affected threads. Finally, update the affected forums. This should significantly reduce the number of queries.
2019-03-14, 05:24 PM
Hi,
Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.
Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/3612
Thanks for contributing to MyBB!
Regards,
The MyBB Group
Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.
Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/3612
Thanks for contributing to MyBB!
Regards,
The MyBB Group
2019-03-14, 05:35 PM
Boom. Its not a bug.
Why pushed? Does anyone care this performance impact.?
No one even noticed in like 5 yrs.
Well, as I said, it should be improved. Yeah...
Why pushed? Does anyone care this performance impact.?
No one even noticed in like 5 yrs.
Well, as I said, it should be improved. Yeah...