Revert "Set template type based on request headers content-type if set"

This reverts commit 005f626b88.

# Conflicts:
#	CHANGELOG.md
#	system/src/Grav/Common/Page/Page.php
This commit is contained in:
Andy Miller
2018-11-11 15:01:44 -07:00
parent 0c81568df6
commit ecbc401584
2 changed files with 1 additions and 5 deletions

View File

@@ -4,7 +4,6 @@
1. [](#improved)
* Allow custom Flex form views
* Cleaned up and sorted the Service `idMap`
* Allow request headers `Content-Type` to set the template type [form#221](https://github.com/getgrav/grav-plugin-form/issues/221)
1. [](#bugfix)
* Fixed `Uri::hasStandardPort()` to support reverse proxy configurations [#1786](https://github.com/getgrav/grav/issues/1786)
* Use `append_url_extension` from page header to set template format if set [#2604](https://github.com/getgrav/grav/pull/2064)

View File

@@ -1292,10 +1292,7 @@ class Page implements PageInterface
}
if (empty($this->template_format)) {
$content_type = Grav::instance()['uri']->getContentType(true);
$fallback_type = Utils::getExtensionByMime($content_type);
$default = is_null($content_type) ? Grav::instance()['uri']->extension('html') : $fallback_type;
$this->template_format = $default;
$this->template_format = Grav::instance()['uri']->extension('html');
}
return $this->template_format;