Conversation
This was disabled in 2023 for unknown reasons. Can we try to enable it again and see what happens?
tacsipacsi
left a comment
There was a problem hiding this comment.
It was actually disabled probably much earlier, before I started contributing here: c879212 only brought the already-existing code changes to GitHub. I’d appreciate if @Steinsplitter could comment if they have any idea why it was disabled.
| else if(substr(strtolower($picture['title']),-4) == ".png") { $image->filetype = "png"; } | ||
| else if(substr(strtolower($picture['title']),-4) == ".gif") { $image->filetype = "gif"; } | ||
| // if(substr(strtolower($picture['title']),-5) == ".tiff" OR substr(strtolower($picture['title']),-4) == ".tif") { $image->filetype = "tif"; } | ||
| if(preg_match('/\.tiff?$/i',$picture['title'])) { $image->filetype = "tif"; } |
There was a problem hiding this comment.
I’d keep the code consistent: either preg_match() for all file types or substr(strtolower()) for all file types.
There was a problem hiding this comment.
Please feel free to upload another patch that does this or edit this patch accordingly. I found it important to keep this patch as small as possible so it's very obvious what it's supposed to do, and very easy to revert if needed.
There was a problem hiding this comment.
I agree with keeping the change as small as possible to make it easier to revert. However, there are two ways to ensure consistency, and only one of them makes the diff larger – the other one actually makes it even smaller and even more focused.
There was a problem hiding this comment.
As said, please feel free to edit this patch.
This was disabled in 2023 for unknown reasons. Can we try to enable it again and see what happens?