SimpleMachines / tools

Tools for SMF: useful scripts, install/repair and others.
22 stars 34 forks source link

Retain attachment dir indexes #53

Closed BrickOzp closed 2 years ago

BrickOzp commented 2 years ago

When running the repair_settings with attachments directories with non continous indexes, the indexes was reset to a continous index. If one of the reindexed directories was selected as current attachment directory, it would point to the wrong, or non existing attachment directory index. Fix this by passing and using the current indexes.

Non coninous indexes can happen if an attachment directory is removed that is not the last.

Signed-off-by: Oscar Rydhé oscar.rydhe@gmail.com

sbulen commented 2 years ago

I was able to confirm the bug using 2.0. Yep, if there was a gap, it renumbered, even if you didn't change anything... Once you hit SAVE.

I started testing all 3 of these together (#53 , #54 , #55 ) in SMF 2.0 and I am still seeing this bug in 2.0 even with these edits.

EDIT: Something funky was cached somewhere. Everything looks good!

sbulen commented 2 years ago

Also confirmed nothing got broken under 1.x...