Merge pull request #9914 from owncloud/fix-appframework-blank-template
Fix template rendering for 'blank' templates
This commit is contained in:
commit
7d6221d25d
|
@ -134,8 +134,10 @@ class TemplateResponse extends Response {
|
||||||
* @return string the rendered html
|
* @return string the rendered html
|
||||||
*/
|
*/
|
||||||
public function render(){
|
public function render(){
|
||||||
|
// \OCP\Template needs an empty string instead of 'blank' for an unwrapped response
|
||||||
|
$renderAs = $this->renderAs === 'blank' ? '' : $this->renderAs;
|
||||||
|
|
||||||
$template = new \OCP\Template($this->appName, $this->templateName, $this->renderAs);
|
$template = new \OCP\Template($this->appName, $this->templateName, $renderAs);
|
||||||
|
|
||||||
foreach($this->params as $key => $value){
|
foreach($this->params as $key => $value){
|
||||||
$template->assign($key, $value);
|
$template->assign($key, $value);
|
||||||
|
|
Loading…
Reference in New Issue