MDL-30165: Make repository file extension check case insensitive
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Mon, 7 Nov 2011 11:14:19 +0000 (11:14 +0000)
committerAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Mon, 7 Nov 2011 11:14:19 +0000 (11:14 +0000)
repository/lib.php

index fbdcd7d..67b1a13 100644 (file)
@@ -1619,7 +1619,7 @@ abstract class repository {
                         $pass = true;
                     } else {
                         foreach ($extensions as $ext) {
-                            if (preg_match('#'.$ext.'$#', $value['title'])) {
+                            if (preg_match('#'.$ext.'$#i', $value['title'])) {
                                 $pass = true;
                             }
                         }