Not signed in (Sign In)
 
 
Aug 22nd 2007
 
I have some more issues with the Uploader class (which I stumbled into when I was writing Attachments)... I can't remember them right now, but I'll have a look at the class.
 
Aug 23rd 2007
 
Mark does the addons site use this case too? I assume it does but this change would be useful there too.
 
Aug 27th 2007
 
Yeah, it all uses the same thing. I'll see about updating it.
 
Sep 9th 2007 edited
 
Ok, I couldn't find the stuff I wanted fixed... I guess I found another way to have Attachments work

Anyway.. I've added the following line:
if (!in_array(strtoupper($FileExtension), explode(',', strtoupper(join(',', $this->AllowedFileTypes[$FileType]))))) {

This way you have a "real" case-insensitive check, as the AllowedFileTypes doesn't have to be in uppercase either. I use the join/explode method, as it's the fastest way to uppercase an array:
http://lixlpixel.org/php-benchmarks/array-values-to-uppercase/#explode-/-join

(Revision 126)

Issue information

  • 1
  • Jazzman

    Jazzman

    Bug Tracker

  • Resolved
  • Low
  • Bug

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.