Closed BrickOzp closed 2 years ago
Actually, I was just using it on a 2.1 forum and got the following...
Forum was migrated from 2.0, & has never had base directories:
Thanks for testing @sbulen Turns out there was no check if a setting existed so this error could happen for any of the settings.
That's because none of the others are optional.
I've used this tool hundreds of times in all different smf versions & have never seen that.
So thanks for fixing!
As an example, without an avatar url, this is the old behavior:
Vs this is how it behaves with this PR:
You can either go with a "show it when present" behavior, or maybe a bit better, "show it when basedir specified in the options".
I'm not totally familiar with basedirs, I think they may be required when automanage_attachments isn't empty??? Not sure, that would require some research & testing...
Note you can also have multiple basedirs, which, to be honest, makes zero sense to me.... The logic only uses one, right? Which one?
Works great now, thanks. Let's give it another day or so of airtime to see if anyone else wants to pipe in.
It's possible SleePy would want the version incremented? He has asked for that before. Might be smart to do that before we merge.
I can send a quick update for the version when we update the downloads page. Its supposed to help us indicate if people have a old version of the tool. Both the date and version are used. Version to indicate revisions to the code, the date to indicate the published date.
So should we merge this now?
Attachment basedir paths also needs to be updated.
Signed-off-by: Oscar Rydhé oscar.rydhe@gmail.com