srchub

srchub Commit Details


Date:2016-04-03 15:32:00 (8 years 8 months ago)
Author:Natalie Adams
Branch:master
Commit:4e94e60934ebae113d143a9765a784dc4b162f22
Parents: 86c15a38d9f8ffd595657ca4baf98dd49e31cc32
Message:Issue 149: Resources uploaded with extensions with capital letters have wrong mime type

Changes:

File differences

indefero/src/IDF/FileUtil.php
128128
129129
130130
131
131132
132133
133134
134
135
135136
136137
137138
$info = pathinfo($file);
if (isset($info['extension'])) {
$extension = strtolower($info["extension"]);
foreach ($mimes as $mime) {
if ('#' != substr($mime, 0, 1)) {
$elts = preg_split('/ |\t/', $mime, -1, PREG_SPLIT_NO_EMPTY);
if (in_array($info['extension'], $elts)) {
if (in_array($extension, $elts)) {
return array($elts[0], $info['basename'], $info['extension']);
}
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.05325s using 20 queries.