From: sam_marshall <sam_marshall>
Date: Wed, 4 Mar 2009 11:55:08 +0000 (+0000)
Subject: MDL-15913: Smartpix fails if themes or images have upper-case names
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=094480a58576e41fdb5d2662710613d313a313cb;p=moodle.git

MDL-15913: Smartpix fails if themes or images have upper-case names
---

diff --git a/pix/smartpix.php b/pix/smartpix.php
index cb8c9b0332..e44628de5a 100644
--- a/pix/smartpix.php
+++ b/pix/smartpix.php
@@ -111,7 +111,7 @@ if(!(isset($dirroot) && isset($dataroot))) {
 // Split path - starts with theme name, then actual image path inside pix
 $path=get_file_argument_limited('smartpix.php');
 $match=array();
-if(!preg_match('|^/([a-z0-9_\-.]+)/([a-z0-9/_\-.]+)$|',$path,$match)) {
+if(!preg_match('|^/([a-zA-Z0-9_\-.]+)/([a-zA-Z0-9/_\-.]+)$|',$path,$match)) {
     error('Unexpected request format');
 }
 list($junk,$theme,$path)=$match;