TinyPortal
Development => Feedback => Topic started by: Leviathan on October 13, 2006, 03:01:11 PM
wouldn't it make more sense if the file format/extension check is not case sensitive? Sure you could add the allowed extensions both in lower and upper case, but is there really any point in allowing .jpg and not .JPG files?
Anyway, I've made the following change in the TPdlmanager.php file to accomplish this, works for me :)
replace:
if(substr($name, strlen($name)-$extlen, $extlen)==$ext)
with:
if(strcasecmp(substr($name, strlen($name)-$extlen, $extlen), $ext)==0)
Well, for the normal ones it wouldn't matter, but in case of any obscure ones its done this way.
Besides, extension case are the uploaders responsibility, not TP. If someone insist on mixing them - which is a bad habit, many servers are sensitive to case in names - then at least admin can control it by adding all the variations.