MDL-25215 fix file.JPG.jpg extension problems
authorPetr Skoda <commits@skodak.org>
Mon, 14 Feb 2011 08:50:07 +0000 (09:50 +0100)
committerPetr Skoda <commits@skodak.org>
Mon, 14 Feb 2011 08:50:07 +0000 (09:50 +0100)
repository/upload/lib.php

index 2481607..3619d4f 100755 (executable)
@@ -114,7 +114,7 @@ class repository_upload extends repository {
                 }
             }
             $ext = !empty($ext) ? $ext : '';
-            if (preg_match('#\.(' . $ext . ')$#', $saveas_filename)) {
+            if (preg_match('#\.(' . $ext . ')$#i', $saveas_filename)) {
                 // saveas filename contains file extension already
                 $record->filename = $saveas_filename;
             } else {