mirror of
https://github.com/getgrav/grav.git
synced 2026-07-08 18:42:40 +02:00
more explicit check for page extension
This commit is contained in:
@@ -441,7 +441,17 @@ class Grav extends Container
|
||||
}
|
||||
|
||||
// unsupported media type, try to download it...
|
||||
$extension = $uri->extension() ?: isset($path_parts['extension']) ? $path_parts['extension'] : null;
|
||||
$uri_extension = $uri->extension();
|
||||
if ($uri_extension) {
|
||||
$extension = $uri_extension;
|
||||
} else {
|
||||
if (isset($path_parts['extension'])) {
|
||||
$extension = $path_parts['extension'];
|
||||
} else {
|
||||
$extension = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($extension) {
|
||||
$download = true;
|
||||
if (in_array(ltrim($extension, '.'), $this['config']->get('system.media.unsupported_inline_types'))) {
|
||||
|
||||
Reference in New Issue
Block a user