• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug Variable $_autoResize is ignored

truonglv

Formerly Nobita.Kun
#1
As the title. The variable $_autoResize is being ignored in the file XenForo_Upload. Also I have try to provide width, height constraints and you are using to determine resize or not.
 

Chris D

XenForo developer
Staff member
#2
I think "unused" is probably a better description than ignored.

I've just checked back as far as when that variable was first added (way back in 1.0.0 Alpha) and it has never been used.

With that in mind, there's no expectation for this variable to be used, so at best we would remove it completely, though ultimately it will probably remain and remain unused.

Auto resize will happen automatically, regardless of that variable, if there is a max width/height and the width/height exceeds the max width/height. We also determine whether the server can handle the resize operation by checking the width/height against the config value maxImageResizePixelCount.

If you're trying to do something specific, I recommend posting in the developer discussions forum.
 

truonglv

Formerly Nobita.Kun
#3
Yup. I think unused is better then ignore. I just try to disable auto resize but aware that no way for that. First time i think set that variable to false but i saw it is never used :D
 

Mike

XenForo developer
Staff member
#4
I'm removing the variable as it's not part of a public interface, but the fact that it's unused isn't really unexpected with the design used at this point.