fix getMimetype()

This commit is contained in:
Uwe Steinmann 2022-11-15 16:15:24 +01:00
parent 08d10d2cc0
commit 83770f7521

View File

@ -415,7 +415,7 @@ function getMimeType($filename) { /* {{{ */
case 'text/plain':
$lastDotIndex = strrpos($filename, ".");
if($lastDotIndex === false) $fileType = ".";
else $fileType = substr($name, $lastDotIndex);
else $fileType = substr($filename, $lastDotIndex);
if($fileType == '.md')
$mimetype = 'text/markdown';
break;